1. Packages
  2. Fastly Provider
  3. API Docs
  4. getTlsPrivateKey
Fastly v8.13.0 published on Wednesday, Nov 13, 2024 by Pulumi

fastly.getTlsPrivateKey

Explore with Pulumi AI

fastly logo
Fastly v8.13.0 published on Wednesday, Nov 13, 2024 by Pulumi

    Use this data source to get information on a TLS Private Key uploaded to Fastly.

    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 demo = fastly.getTlsPrivateKey({
        name: "demo-private-key",
    });
    export const privateKeyNeedsReplacing = demo.then(demo => demo.replace);
    
    import pulumi
    import pulumi_fastly as fastly
    
    demo = fastly.get_tls_private_key(name="demo-private-key")
    pulumi.export("privateKeyNeedsReplacing", demo.replace)
    
    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 {
    		demo, err := fastly.LookupTlsPrivateKey(ctx, &fastly.LookupTlsPrivateKeyArgs{
    			Name: pulumi.StringRef("demo-private-key"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("privateKeyNeedsReplacing", demo.Replace)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Fastly = Pulumi.Fastly;
    
    return await Deployment.RunAsync(() => 
    {
        var demo = Fastly.GetTlsPrivateKey.Invoke(new()
        {
            Name = "demo-private-key",
        });
    
        return new Dictionary<string, object?>
        {
            ["privateKeyNeedsReplacing"] = demo.Apply(getTlsPrivateKeyResult => getTlsPrivateKeyResult.Replace),
        };
    });
    
    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.GetTlsPrivateKeyArgs;
    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 demo = FastlyFunctions.getTlsPrivateKey(GetTlsPrivateKeyArgs.builder()
                .name("demo-private-key")
                .build());
    
            ctx.export("privateKeyNeedsReplacing", demo.applyValue(getTlsPrivateKeyResult -> getTlsPrivateKeyResult.replace()));
        }
    }
    
    variables:
      demo:
        fn::invoke:
          Function: fastly:getTlsPrivateKey
          Arguments:
            name: demo-private-key
    outputs:
      privateKeyNeedsReplacing: ${demo.replace}
    

    Using getTlsPrivateKey

    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 getTlsPrivateKey(args: GetTlsPrivateKeyArgs, opts?: InvokeOptions): Promise<GetTlsPrivateKeyResult>
    function getTlsPrivateKeyOutput(args: GetTlsPrivateKeyOutputArgs, opts?: InvokeOptions): Output<GetTlsPrivateKeyResult>
    def get_tls_private_key(created_at: Optional[str] = None,
                            id: Optional[str] = None,
                            key_length: Optional[int] = None,
                            key_type: Optional[str] = None,
                            name: Optional[str] = None,
                            public_key_sha1: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetTlsPrivateKeyResult
    def get_tls_private_key_output(created_at: Optional[pulumi.Input[str]] = None,
                            id: Optional[pulumi.Input[str]] = None,
                            key_length: Optional[pulumi.Input[int]] = None,
                            key_type: Optional[pulumi.Input[str]] = None,
                            name: Optional[pulumi.Input[str]] = None,
                            public_key_sha1: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetTlsPrivateKeyResult]
    func LookupTlsPrivateKey(ctx *Context, args *LookupTlsPrivateKeyArgs, opts ...InvokeOption) (*LookupTlsPrivateKeyResult, error)
    func LookupTlsPrivateKeyOutput(ctx *Context, args *LookupTlsPrivateKeyOutputArgs, opts ...InvokeOption) LookupTlsPrivateKeyResultOutput

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

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

    The following arguments are supported:

    CreatedAt string
    Timestamp (GMT) when the private key was created.
    Id string
    Fastly private key ID. Conflicts with all the other filters
    KeyLength int
    The key length used to generate the private key.
    KeyType string
    The algorithm used to generate the private key. Must be RSA.
    Name string
    The human-readable name assigned to the private key when uploaded.
    PublicKeySha1 string
    A hash of the associated public key, useful for safely identifying it.
    CreatedAt string
    Timestamp (GMT) when the private key was created.
    Id string
    Fastly private key ID. Conflicts with all the other filters
    KeyLength int
    The key length used to generate the private key.
    KeyType string
    The algorithm used to generate the private key. Must be RSA.
    Name string
    The human-readable name assigned to the private key when uploaded.
    PublicKeySha1 string
    A hash of the associated public key, useful for safely identifying it.
    createdAt String
    Timestamp (GMT) when the private key was created.
    id String
    Fastly private key ID. Conflicts with all the other filters
    keyLength Integer
    The key length used to generate the private key.
    keyType String
    The algorithm used to generate the private key. Must be RSA.
    name String
    The human-readable name assigned to the private key when uploaded.
    publicKeySha1 String
    A hash of the associated public key, useful for safely identifying it.
    createdAt string
    Timestamp (GMT) when the private key was created.
    id string
    Fastly private key ID. Conflicts with all the other filters
    keyLength number
    The key length used to generate the private key.
    keyType string
    The algorithm used to generate the private key. Must be RSA.
    name string
    The human-readable name assigned to the private key when uploaded.
    publicKeySha1 string
    A hash of the associated public key, useful for safely identifying it.
    created_at str
    Timestamp (GMT) when the private key was created.
    id str
    Fastly private key ID. Conflicts with all the other filters
    key_length int
    The key length used to generate the private key.
    key_type str
    The algorithm used to generate the private key. Must be RSA.
    name str
    The human-readable name assigned to the private key when uploaded.
    public_key_sha1 str
    A hash of the associated public key, useful for safely identifying it.
    createdAt String
    Timestamp (GMT) when the private key was created.
    id String
    Fastly private key ID. Conflicts with all the other filters
    keyLength Number
    The key length used to generate the private key.
    keyType String
    The algorithm used to generate the private key. Must be RSA.
    name String
    The human-readable name assigned to the private key when uploaded.
    publicKeySha1 String
    A hash of the associated public key, useful for safely identifying it.

    getTlsPrivateKey Result

    The following output properties are available:

    CreatedAt string
    Timestamp (GMT) when the private key was created.
    Id string
    Fastly private key ID. Conflicts with all the other filters
    KeyLength int
    The key length used to generate the private key.
    KeyType string
    The algorithm used to generate the private key. Must be RSA.
    Name string
    The human-readable name assigned to the private key when uploaded.
    PublicKeySha1 string
    A hash of the associated public key, useful for safely identifying it.
    Replace bool
    Whether Fastly recommends replacing this private key.
    CreatedAt string
    Timestamp (GMT) when the private key was created.
    Id string
    Fastly private key ID. Conflicts with all the other filters
    KeyLength int
    The key length used to generate the private key.
    KeyType string
    The algorithm used to generate the private key. Must be RSA.
    Name string
    The human-readable name assigned to the private key when uploaded.
    PublicKeySha1 string
    A hash of the associated public key, useful for safely identifying it.
    Replace bool
    Whether Fastly recommends replacing this private key.
    createdAt String
    Timestamp (GMT) when the private key was created.
    id String
    Fastly private key ID. Conflicts with all the other filters
    keyLength Integer
    The key length used to generate the private key.
    keyType String
    The algorithm used to generate the private key. Must be RSA.
    name String
    The human-readable name assigned to the private key when uploaded.
    publicKeySha1 String
    A hash of the associated public key, useful for safely identifying it.
    replace Boolean
    Whether Fastly recommends replacing this private key.
    createdAt string
    Timestamp (GMT) when the private key was created.
    id string
    Fastly private key ID. Conflicts with all the other filters
    keyLength number
    The key length used to generate the private key.
    keyType string
    The algorithm used to generate the private key. Must be RSA.
    name string
    The human-readable name assigned to the private key when uploaded.
    publicKeySha1 string
    A hash of the associated public key, useful for safely identifying it.
    replace boolean
    Whether Fastly recommends replacing this private key.
    created_at str
    Timestamp (GMT) when the private key was created.
    id str
    Fastly private key ID. Conflicts with all the other filters
    key_length int
    The key length used to generate the private key.
    key_type str
    The algorithm used to generate the private key. Must be RSA.
    name str
    The human-readable name assigned to the private key when uploaded.
    public_key_sha1 str
    A hash of the associated public key, useful for safely identifying it.
    replace bool
    Whether Fastly recommends replacing this private key.
    createdAt String
    Timestamp (GMT) when the private key was created.
    id String
    Fastly private key ID. Conflicts with all the other filters
    keyLength Number
    The key length used to generate the private key.
    keyType String
    The algorithm used to generate the private key. Must be RSA.
    name String
    The human-readable name assigned to the private key when uploaded.
    publicKeySha1 String
    A hash of the associated public key, useful for safely identifying it.
    replace Boolean
    Whether Fastly recommends replacing this private key.

    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.13.0 published on Wednesday, Nov 13, 2024 by Pulumi