1. Packages
  2. Fastly
  3. API Docs
  4. getTlsCertificateIds
Fastly v8.7.0 published on Friday, May 10, 2024 by Pulumi

fastly.getTlsCertificateIds

Explore with Pulumi AI

fastly logo
Fastly v8.7.0 published on Friday, May 10, 2024 by Pulumi

    Use this data source to get the IDs of available TLS certificates for use with other resources.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as fastly from "@pulumi/fastly";
    
    const example = fastly.getTlsCertificateIds({});
    const exampleTlsActivation = new fastly.TlsActivation("example", {certificateId: example.then(example => example.ids?.[0])});
    
    import pulumi
    import pulumi_fastly as fastly
    
    example = fastly.get_tls_certificate_ids()
    example_tls_activation = fastly.TlsActivation("example", certificate_id=example.ids[0])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-fastly/sdk/v8/go/fastly"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := fastly.GetTlsCertificateIds(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		_, err = fastly.NewTlsActivation(ctx, "example", &fastly.TlsActivationArgs{
    			CertificateId: pulumi.String(example.Ids[0]),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Fastly = Pulumi.Fastly;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Fastly.GetTlsCertificateIds.Invoke();
    
        var exampleTlsActivation = new Fastly.TlsActivation("example", new()
        {
            CertificateId = example.Apply(getTlsCertificateIdsResult => getTlsCertificateIdsResult.Ids[0]),
        });
    
    });
    
    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.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.getTlsCertificateIds();
    
            var exampleTlsActivation = new TlsActivation("exampleTlsActivation", TlsActivationArgs.builder()        
                .certificateId(example.applyValue(getTlsCertificateIdsResult -> getTlsCertificateIdsResult.ids()[0]))
                .build());
    
        }
    }
    
    resources:
      exampleTlsActivation:
        type: fastly:TlsActivation
        name: example
        properties:
          certificateId: ${example.ids[0]}
    variables:
      example:
        fn::invoke:
          Function: fastly:getTlsCertificateIds
          Arguments: {}
    

    Using getTlsCertificateIds

    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 getTlsCertificateIds(opts?: InvokeOptions): Promise<GetTlsCertificateIdsResult>
    function getTlsCertificateIdsOutput(opts?: InvokeOptions): Output<GetTlsCertificateIdsResult>
    def get_tls_certificate_ids(opts: Optional[InvokeOptions] = None) -> GetTlsCertificateIdsResult
    def get_tls_certificate_ids_output(opts: Optional[InvokeOptions] = None) -> Output[GetTlsCertificateIdsResult]
    func GetTlsCertificateIds(ctx *Context, opts ...InvokeOption) (*GetTlsCertificateIdsResult, error)
    func GetTlsCertificateIdsOutput(ctx *Context, opts ...InvokeOption) GetTlsCertificateIdsResultOutput

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

    public static class GetTlsCertificateIds 
    {
        public static Task<GetTlsCertificateIdsResult> InvokeAsync(InvokeOptions? opts = null)
        public static Output<GetTlsCertificateIdsResult> Invoke(InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTlsCertificateIdsResult> getTlsCertificateIds(InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: fastly:index/getTlsCertificateIds:getTlsCertificateIds
      arguments:
        # arguments dictionary

    getTlsCertificateIds Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    List of IDs corresponding to Custom TLS certificates.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    List of IDs corresponding to Custom TLS certificates.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    List of IDs corresponding to Custom TLS certificates.
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    List of IDs corresponding to Custom TLS certificates.
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    List of IDs corresponding to Custom TLS certificates.
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    List of IDs corresponding to Custom TLS certificates.

    Package Details

    Repository
    Fastly pulumi/pulumi-fastly
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the fastly Terraform Provider.
    fastly logo
    Fastly v8.7.0 published on Friday, May 10, 2024 by Pulumi