fastly.getTlsPrivateKey
Explore with Pulumi AI
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:
- Created
At string - Timestamp (GMT) when the private key was created.
- Id string
- Fastly private key ID. Conflicts with all the other filters
- Key
Length int - The key length used to generate the private key.
- Key
Type 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.
- Public
Key stringSha1 - A hash of the associated public key, useful for safely identifying it.
- Created
At string - Timestamp (GMT) when the private key was created.
- Id string
- Fastly private key ID. Conflicts with all the other filters
- Key
Length int - The key length used to generate the private key.
- Key
Type 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.
- Public
Key stringSha1 - A hash of the associated public key, useful for safely identifying it.
- created
At String - Timestamp (GMT) when the private key was created.
- id String
- Fastly private key ID. Conflicts with all the other filters
- key
Length Integer - The key length used to generate the private key.
- key
Type 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.
- public
Key StringSha1 - A hash of the associated public key, useful for safely identifying it.
- created
At string - Timestamp (GMT) when the private key was created.
- id string
- Fastly private key ID. Conflicts with all the other filters
- key
Length number - The key length used to generate the private key.
- key
Type 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.
- public
Key stringSha1 - 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_ strsha1 - A hash of the associated public key, useful for safely identifying it.
- created
At String - Timestamp (GMT) when the private key was created.
- id String
- Fastly private key ID. Conflicts with all the other filters
- key
Length Number - The key length used to generate the private key.
- key
Type 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.
- public
Key StringSha1 - A hash of the associated public key, useful for safely identifying it.
getTlsPrivateKey Result
The following output properties are available:
- Created
At string - Timestamp (GMT) when the private key was created.
- Id string
- Fastly private key ID. Conflicts with all the other filters
- Key
Length int - The key length used to generate the private key.
- Key
Type 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.
- Public
Key stringSha1 - A hash of the associated public key, useful for safely identifying it.
- Replace bool
- Whether Fastly recommends replacing this private key.
- Created
At string - Timestamp (GMT) when the private key was created.
- Id string
- Fastly private key ID. Conflicts with all the other filters
- Key
Length int - The key length used to generate the private key.
- Key
Type 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.
- Public
Key stringSha1 - A hash of the associated public key, useful for safely identifying it.
- Replace bool
- Whether Fastly recommends replacing this private key.
- created
At String - Timestamp (GMT) when the private key was created.
- id String
- Fastly private key ID. Conflicts with all the other filters
- key
Length Integer - The key length used to generate the private key.
- key
Type 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.
- public
Key StringSha1 - A hash of the associated public key, useful for safely identifying it.
- replace Boolean
- Whether Fastly recommends replacing this private key.
- created
At string - Timestamp (GMT) when the private key was created.
- id string
- Fastly private key ID. Conflicts with all the other filters
- key
Length number - The key length used to generate the private key.
- key
Type 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.
- public
Key stringSha1 - 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_ strsha1 - A hash of the associated public key, useful for safely identifying it.
- replace bool
- Whether Fastly recommends replacing this private key.
- created
At String - Timestamp (GMT) when the private key was created.
- id String
- Fastly private key ID. Conflicts with all the other filters
- key
Length Number - The key length used to generate the private key.
- key
Type 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.
- public
Key StringSha1 - 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.