1. Packages
  2. Fastly Provider
  3. API Docs
  4. getTlsConfiguration
Fastly v9.0.0 published on Tuesday, Apr 8, 2025 by Pulumi

fastly.getTlsConfiguration

Explore with Pulumi AI

Use this data source to get the ID of a TLS configuration for use with other resources.

Warning: The data source’s filters are applied using an AND boolean operator, so depending on the combination of filters, they may become mutually exclusive. The exception to this is id which must not be specified in combination with any of the others.

Note: If more or less than a single match is returned by the search, this provider will fail. Ensure that your search is specific enough to return a single key.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as fastly from "@pulumi/fastly";

const example = fastly.getTlsConfiguration({
    "default": true,
});
const exampleTlsActivation = new fastly.TlsActivation("example", {configurationId: example.then(example => example.id)});
Copy
import pulumi
import pulumi_fastly as fastly

example = fastly.get_tls_configuration(default=True)
example_tls_activation = fastly.TlsActivation("example", configuration_id=example.id)
Copy
package main

import (
	"github.com/pulumi/pulumi-fastly/sdk/v9/go/fastly"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := fastly.GetTlsConfiguration(ctx, &fastly.GetTlsConfigurationArgs{
			Default: pulumi.BoolRef(true),
		}, nil)
		if err != nil {
			return err
		}
		_, err = fastly.NewTlsActivation(ctx, "example", &fastly.TlsActivationArgs{
			ConfigurationId: pulumi.String(example.Id),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Fastly = Pulumi.Fastly;

return await Deployment.RunAsync(() => 
{
    var example = Fastly.GetTlsConfiguration.Invoke(new()
    {
        Default = true,
    });

    var exampleTlsActivation = new Fastly.TlsActivation("example", new()
    {
        ConfigurationId = example.Apply(getTlsConfigurationResult => getTlsConfigurationResult.Id),
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.fastly.FastlyFunctions;
import com.pulumi.fastly.inputs.GetTlsConfigurationArgs;
import com.pulumi.fastly.TlsActivation;
import com.pulumi.fastly.TlsActivationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = FastlyFunctions.getTlsConfiguration(GetTlsConfigurationArgs.builder()
            .default_(true)
            .build());

        var exampleTlsActivation = new TlsActivation("exampleTlsActivation", TlsActivationArgs.builder()
            .configurationId(example.applyValue(getTlsConfigurationResult -> getTlsConfigurationResult.id()))
            .build());

    }
}
Copy
resources:
  exampleTlsActivation:
    type: fastly:TlsActivation
    name: example
    properties:
      configurationId: ${example.id}
variables:
  example:
    fn::invoke:
      function: fastly:getTlsConfiguration
      arguments:
        default: true
Copy

Using getTlsConfiguration

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getTlsConfiguration(args: GetTlsConfigurationArgs, opts?: InvokeOptions): Promise<GetTlsConfigurationResult>
function getTlsConfigurationOutput(args: GetTlsConfigurationOutputArgs, opts?: InvokeOptions): Output<GetTlsConfigurationResult>
Copy
def get_tls_configuration(default: Optional[bool] = None,
                          http_protocols: Optional[Sequence[str]] = None,
                          id: Optional[str] = None,
                          name: Optional[str] = None,
                          tls_protocols: Optional[Sequence[str]] = None,
                          tls_service: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetTlsConfigurationResult
def get_tls_configuration_output(default: Optional[pulumi.Input[bool]] = None,
                          http_protocols: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                          id: Optional[pulumi.Input[str]] = None,
                          name: Optional[pulumi.Input[str]] = None,
                          tls_protocols: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                          tls_service: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetTlsConfigurationResult]
Copy
func GetTlsConfiguration(ctx *Context, args *GetTlsConfigurationArgs, opts ...InvokeOption) (*GetTlsConfigurationResult, error)
func GetTlsConfigurationOutput(ctx *Context, args *GetTlsConfigurationOutputArgs, opts ...InvokeOption) GetTlsConfigurationResultOutput
Copy

> Note: This function is named GetTlsConfiguration in the Go SDK.

public static class GetTlsConfiguration 
{
    public static Task<GetTlsConfigurationResult> InvokeAsync(GetTlsConfigurationArgs args, InvokeOptions? opts = null)
    public static Output<GetTlsConfigurationResult> Invoke(GetTlsConfigurationInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetTlsConfigurationResult> getTlsConfiguration(GetTlsConfigurationArgs args, InvokeOptions options)
public static Output<GetTlsConfigurationResult> getTlsConfiguration(GetTlsConfigurationArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: fastly:index/getTlsConfiguration:getTlsConfiguration
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Default bool
Signifies whether Fastly will use this configuration as a default when creating a new TLS activation.
HttpProtocols List<string>
HTTP protocols available on the TLS configuration.
Id string
ID of the TLS configuration obtained from the Fastly API or another data source. Conflicts with all the other filters.
Name string
Custom name of the TLS configuration.
TlsProtocols List<string>
TLS protocols available on the TLS configuration.
TlsService string
Whether the configuration should support the PLATFORM or CUSTOM TLS service.
Default bool
Signifies whether Fastly will use this configuration as a default when creating a new TLS activation.
HttpProtocols []string
HTTP protocols available on the TLS configuration.
Id string
ID of the TLS configuration obtained from the Fastly API or another data source. Conflicts with all the other filters.
Name string
Custom name of the TLS configuration.
TlsProtocols []string
TLS protocols available on the TLS configuration.
TlsService string
Whether the configuration should support the PLATFORM or CUSTOM TLS service.
default_ Boolean
Signifies whether Fastly will use this configuration as a default when creating a new TLS activation.
httpProtocols List<String>
HTTP protocols available on the TLS configuration.
id String
ID of the TLS configuration obtained from the Fastly API or another data source. Conflicts with all the other filters.
name String
Custom name of the TLS configuration.
tlsProtocols List<String>
TLS protocols available on the TLS configuration.
tlsService String
Whether the configuration should support the PLATFORM or CUSTOM TLS service.
default boolean
Signifies whether Fastly will use this configuration as a default when creating a new TLS activation.
httpProtocols string[]
HTTP protocols available on the TLS configuration.
id string
ID of the TLS configuration obtained from the Fastly API or another data source. Conflicts with all the other filters.
name string
Custom name of the TLS configuration.
tlsProtocols string[]
TLS protocols available on the TLS configuration.
tlsService string
Whether the configuration should support the PLATFORM or CUSTOM TLS service.
default bool
Signifies whether Fastly will use this configuration as a default when creating a new TLS activation.
http_protocols Sequence[str]
HTTP protocols available on the TLS configuration.
id str
ID of the TLS configuration obtained from the Fastly API or another data source. Conflicts with all the other filters.
name str
Custom name of the TLS configuration.
tls_protocols Sequence[str]
TLS protocols available on the TLS configuration.
tls_service str
Whether the configuration should support the PLATFORM or CUSTOM TLS service.
default Boolean
Signifies whether Fastly will use this configuration as a default when creating a new TLS activation.
httpProtocols List<String>
HTTP protocols available on the TLS configuration.
id String
ID of the TLS configuration obtained from the Fastly API or another data source. Conflicts with all the other filters.
name String
Custom name of the TLS configuration.
tlsProtocols List<String>
TLS protocols available on the TLS configuration.
tlsService String
Whether the configuration should support the PLATFORM or CUSTOM TLS service.

getTlsConfiguration Result

The following output properties are available:

CreatedAt string
Timestamp (GMT) when the configuration was created.
Default bool
Signifies whether Fastly will use this configuration as a default when creating a new TLS activation.
DnsRecords List<GetTlsConfigurationDnsRecord>
The available DNS addresses that can be used to enable TLS for a domain. DNS must be configured for a domain for TLS handshakes to succeed. If enabling TLS on an apex domain (e.g. example.com) you must create four A records (or four AAAA records for IPv6 support) using the displayed global A record's IP addresses with your DNS provider. For subdomains and wildcard domains (e.g. www.example.com or *.example.com) you will need to create a relevant CNAME record.
HttpProtocols List<string>
HTTP protocols available on the TLS configuration.
Id string
ID of the TLS configuration obtained from the Fastly API or another data source. Conflicts with all the other filters.
Name string
Custom name of the TLS configuration.
TlsProtocols List<string>
TLS protocols available on the TLS configuration.
TlsService string
Whether the configuration should support the PLATFORM or CUSTOM TLS service.
UpdatedAt string
Timestamp (GMT) when the configuration was last updated.
CreatedAt string
Timestamp (GMT) when the configuration was created.
Default bool
Signifies whether Fastly will use this configuration as a default when creating a new TLS activation.
DnsRecords []GetTlsConfigurationDnsRecord
The available DNS addresses that can be used to enable TLS for a domain. DNS must be configured for a domain for TLS handshakes to succeed. If enabling TLS on an apex domain (e.g. example.com) you must create four A records (or four AAAA records for IPv6 support) using the displayed global A record's IP addresses with your DNS provider. For subdomains and wildcard domains (e.g. www.example.com or *.example.com) you will need to create a relevant CNAME record.
HttpProtocols []string
HTTP protocols available on the TLS configuration.
Id string
ID of the TLS configuration obtained from the Fastly API or another data source. Conflicts with all the other filters.
Name string
Custom name of the TLS configuration.
TlsProtocols []string
TLS protocols available on the TLS configuration.
TlsService string
Whether the configuration should support the PLATFORM or CUSTOM TLS service.
UpdatedAt string
Timestamp (GMT) when the configuration was last updated.
createdAt String
Timestamp (GMT) when the configuration was created.
default_ Boolean
Signifies whether Fastly will use this configuration as a default when creating a new TLS activation.
dnsRecords List<GetTlsConfigurationDnsRecord>
The available DNS addresses that can be used to enable TLS for a domain. DNS must be configured for a domain for TLS handshakes to succeed. If enabling TLS on an apex domain (e.g. example.com) you must create four A records (or four AAAA records for IPv6 support) using the displayed global A record's IP addresses with your DNS provider. For subdomains and wildcard domains (e.g. www.example.com or *.example.com) you will need to create a relevant CNAME record.
httpProtocols List<String>
HTTP protocols available on the TLS configuration.
id String
ID of the TLS configuration obtained from the Fastly API or another data source. Conflicts with all the other filters.
name String
Custom name of the TLS configuration.
tlsProtocols List<String>
TLS protocols available on the TLS configuration.
tlsService String
Whether the configuration should support the PLATFORM or CUSTOM TLS service.
updatedAt String
Timestamp (GMT) when the configuration was last updated.
createdAt string
Timestamp (GMT) when the configuration was created.
default boolean
Signifies whether Fastly will use this configuration as a default when creating a new TLS activation.
dnsRecords GetTlsConfigurationDnsRecord[]
The available DNS addresses that can be used to enable TLS for a domain. DNS must be configured for a domain for TLS handshakes to succeed. If enabling TLS on an apex domain (e.g. example.com) you must create four A records (or four AAAA records for IPv6 support) using the displayed global A record's IP addresses with your DNS provider. For subdomains and wildcard domains (e.g. www.example.com or *.example.com) you will need to create a relevant CNAME record.
httpProtocols string[]
HTTP protocols available on the TLS configuration.
id string
ID of the TLS configuration obtained from the Fastly API or another data source. Conflicts with all the other filters.
name string
Custom name of the TLS configuration.
tlsProtocols string[]
TLS protocols available on the TLS configuration.
tlsService string
Whether the configuration should support the PLATFORM or CUSTOM TLS service.
updatedAt string
Timestamp (GMT) when the configuration was last updated.
created_at str
Timestamp (GMT) when the configuration was created.
default bool
Signifies whether Fastly will use this configuration as a default when creating a new TLS activation.
dns_records Sequence[GetTlsConfigurationDnsRecord]
The available DNS addresses that can be used to enable TLS for a domain. DNS must be configured for a domain for TLS handshakes to succeed. If enabling TLS on an apex domain (e.g. example.com) you must create four A records (or four AAAA records for IPv6 support) using the displayed global A record's IP addresses with your DNS provider. For subdomains and wildcard domains (e.g. www.example.com or *.example.com) you will need to create a relevant CNAME record.
http_protocols Sequence[str]
HTTP protocols available on the TLS configuration.
id str
ID of the TLS configuration obtained from the Fastly API or another data source. Conflicts with all the other filters.
name str
Custom name of the TLS configuration.
tls_protocols Sequence[str]
TLS protocols available on the TLS configuration.
tls_service str
Whether the configuration should support the PLATFORM or CUSTOM TLS service.
updated_at str
Timestamp (GMT) when the configuration was last updated.
createdAt String
Timestamp (GMT) when the configuration was created.
default Boolean
Signifies whether Fastly will use this configuration as a default when creating a new TLS activation.
dnsRecords List<Property Map>
The available DNS addresses that can be used to enable TLS for a domain. DNS must be configured for a domain for TLS handshakes to succeed. If enabling TLS on an apex domain (e.g. example.com) you must create four A records (or four AAAA records for IPv6 support) using the displayed global A record's IP addresses with your DNS provider. For subdomains and wildcard domains (e.g. www.example.com or *.example.com) you will need to create a relevant CNAME record.
httpProtocols List<String>
HTTP protocols available on the TLS configuration.
id String
ID of the TLS configuration obtained from the Fastly API or another data source. Conflicts with all the other filters.
name String
Custom name of the TLS configuration.
tlsProtocols List<String>
TLS protocols available on the TLS configuration.
tlsService String
Whether the configuration should support the PLATFORM or CUSTOM TLS service.
updatedAt String
Timestamp (GMT) when the configuration was last updated.

Supporting Types

GetTlsConfigurationDnsRecord

RecordType This property is required. string
Type of DNS record to set, e.g. A, AAAA, or CNAME.
RecordValue This property is required. string
The IP address or hostname of the DNS record.
Region This property is required. string
The regions that will be used to route traffic. Select DNS Records with a global region to route traffic to the most performant point of presence (POP) worldwide (global pricing will apply). Select DNS records with a us-eu region to exclusively land traffic on North American and European POPs.
RecordType This property is required. string
Type of DNS record to set, e.g. A, AAAA, or CNAME.
RecordValue This property is required. string
The IP address or hostname of the DNS record.
Region This property is required. string
The regions that will be used to route traffic. Select DNS Records with a global region to route traffic to the most performant point of presence (POP) worldwide (global pricing will apply). Select DNS records with a us-eu region to exclusively land traffic on North American and European POPs.
recordType This property is required. String
Type of DNS record to set, e.g. A, AAAA, or CNAME.
recordValue This property is required. String
The IP address or hostname of the DNS record.
region This property is required. String
The regions that will be used to route traffic. Select DNS Records with a global region to route traffic to the most performant point of presence (POP) worldwide (global pricing will apply). Select DNS records with a us-eu region to exclusively land traffic on North American and European POPs.
recordType This property is required. string
Type of DNS record to set, e.g. A, AAAA, or CNAME.
recordValue This property is required. string
The IP address or hostname of the DNS record.
region This property is required. string
The regions that will be used to route traffic. Select DNS Records with a global region to route traffic to the most performant point of presence (POP) worldwide (global pricing will apply). Select DNS records with a us-eu region to exclusively land traffic on North American and European POPs.
record_type This property is required. str
Type of DNS record to set, e.g. A, AAAA, or CNAME.
record_value This property is required. str
The IP address or hostname of the DNS record.
region This property is required. str
The regions that will be used to route traffic. Select DNS Records with a global region to route traffic to the most performant point of presence (POP) worldwide (global pricing will apply). Select DNS records with a us-eu region to exclusively land traffic on North American and European POPs.
recordType This property is required. String
Type of DNS record to set, e.g. A, AAAA, or CNAME.
recordValue This property is required. String
The IP address or hostname of the DNS record.
region This property is required. String
The regions that will be used to route traffic. Select DNS Records with a global region to route traffic to the most performant point of presence (POP) worldwide (global pricing will apply). Select DNS records with a us-eu region to exclusively land traffic on North American and European POPs.

Package Details

Repository
Fastly pulumi/pulumi-fastly
License
Apache-2.0
Notes
This Pulumi package is based on the fastly Terraform Provider.