UNPKG

@pulumi/tls

Version:

A Pulumi package to create TLS resources in Pulumi programs.

129 lines (128 loc) 7.46 kB
import * as pulumi from "@pulumi/pulumi"; export declare class PrivateKey extends pulumi.CustomResource { /** * Get an existing PrivateKey resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input<pulumi.ID>, state?: PrivateKeyState, opts?: pulumi.CustomResourceOptions): PrivateKey; /** * Returns true if the given object is an instance of PrivateKey. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is PrivateKey; /** * Name of the algorithm to use when generating the private key. Currently-supported values are: `RSA`, `ECDSA`, `ED25519`. */ readonly algorithm: pulumi.Output<string>; /** * When `algorithm` is `ECDSA`, the name of the elliptic curve to use. Currently-supported values are: `P224`, `P256`, `P384`, `P521`. (default: `P224`). */ readonly ecdsaCurve: pulumi.Output<string>; /** * Private key data in [OpenSSH PEM (RFC 4716)](https://datatracker.ietf.org/doc/html/rfc4716) format. */ readonly privateKeyOpenssh: pulumi.Output<string>; /** * Private key data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. */ readonly privateKeyPem: pulumi.Output<string>; /** * Private key data in [PKCS#8 PEM (RFC 5208)](https://datatracker.ietf.org/doc/html/rfc5208) format. */ readonly privateKeyPemPkcs8: pulumi.Output<string>; /** * The fingerprint of the public key data in OpenSSH MD5 hash format, e.g. `aa:bb:cc:...`. Only available if the selected private key format is compatible, similarly to `publicKeyOpenssh` and the ECDSA P224 limitations. */ readonly publicKeyFingerprintMd5: pulumi.Output<string>; /** * The fingerprint of the public key data in OpenSSH SHA256 hash format, e.g. `SHA256:...`. Only available if the selected private key format is compatible, similarly to `publicKeyOpenssh` and the ECDSA P224 limitations. */ readonly publicKeyFingerprintSha256: pulumi.Output<string>; /** * The public key data in ["Authorized Keys"](https://www.ssh.com/academy/ssh/authorized_keys/openssh#format-of-the-authorized-keys-file) format. This is not populated for `ECDSA` with curve `P224`, as it is not supported. **NOTE**: the [underlying](https://pkg.go.dev/encoding/pem#Encode) [libraries](https://pkg.go.dev/golang.org/x/crypto/ssh#MarshalAuthorizedKey) that generate this value append a `\n` at the end of the PEM. In case this disrupts your use case, we recommend using `trimspace()`. */ readonly publicKeyOpenssh: pulumi.Output<string>; /** * Public key data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. **NOTE**: the [underlying](https://pkg.go.dev/encoding/pem#Encode) [libraries](https://pkg.go.dev/golang.org/x/crypto/ssh#MarshalAuthorizedKey) that generate this value append a `\n` at the end of the PEM. In case this disrupts your use case, we recommend using `trimspace()`. */ readonly publicKeyPem: pulumi.Output<string>; /** * When `algorithm` is `RSA`, the size of the generated RSA key, in bits (default: `2048`). */ readonly rsaBits: pulumi.Output<number>; /** * Create a PrivateKey resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: PrivateKeyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering PrivateKey resources. */ export interface PrivateKeyState { /** * Name of the algorithm to use when generating the private key. Currently-supported values are: `RSA`, `ECDSA`, `ED25519`. */ algorithm?: pulumi.Input<string>; /** * When `algorithm` is `ECDSA`, the name of the elliptic curve to use. Currently-supported values are: `P224`, `P256`, `P384`, `P521`. (default: `P224`). */ ecdsaCurve?: pulumi.Input<string>; /** * Private key data in [OpenSSH PEM (RFC 4716)](https://datatracker.ietf.org/doc/html/rfc4716) format. */ privateKeyOpenssh?: pulumi.Input<string>; /** * Private key data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. */ privateKeyPem?: pulumi.Input<string>; /** * Private key data in [PKCS#8 PEM (RFC 5208)](https://datatracker.ietf.org/doc/html/rfc5208) format. */ privateKeyPemPkcs8?: pulumi.Input<string>; /** * The fingerprint of the public key data in OpenSSH MD5 hash format, e.g. `aa:bb:cc:...`. Only available if the selected private key format is compatible, similarly to `publicKeyOpenssh` and the ECDSA P224 limitations. */ publicKeyFingerprintMd5?: pulumi.Input<string>; /** * The fingerprint of the public key data in OpenSSH SHA256 hash format, e.g. `SHA256:...`. Only available if the selected private key format is compatible, similarly to `publicKeyOpenssh` and the ECDSA P224 limitations. */ publicKeyFingerprintSha256?: pulumi.Input<string>; /** * The public key data in ["Authorized Keys"](https://www.ssh.com/academy/ssh/authorized_keys/openssh#format-of-the-authorized-keys-file) format. This is not populated for `ECDSA` with curve `P224`, as it is not supported. **NOTE**: the [underlying](https://pkg.go.dev/encoding/pem#Encode) [libraries](https://pkg.go.dev/golang.org/x/crypto/ssh#MarshalAuthorizedKey) that generate this value append a `\n` at the end of the PEM. In case this disrupts your use case, we recommend using `trimspace()`. */ publicKeyOpenssh?: pulumi.Input<string>; /** * Public key data in [PEM (RFC 1421)](https://datatracker.ietf.org/doc/html/rfc1421) format. **NOTE**: the [underlying](https://pkg.go.dev/encoding/pem#Encode) [libraries](https://pkg.go.dev/golang.org/x/crypto/ssh#MarshalAuthorizedKey) that generate this value append a `\n` at the end of the PEM. In case this disrupts your use case, we recommend using `trimspace()`. */ publicKeyPem?: pulumi.Input<string>; /** * When `algorithm` is `RSA`, the size of the generated RSA key, in bits (default: `2048`). */ rsaBits?: pulumi.Input<number>; } /** * The set of arguments for constructing a PrivateKey resource. */ export interface PrivateKeyArgs { /** * Name of the algorithm to use when generating the private key. Currently-supported values are: `RSA`, `ECDSA`, `ED25519`. */ algorithm: pulumi.Input<string>; /** * When `algorithm` is `ECDSA`, the name of the elliptic curve to use. Currently-supported values are: `P224`, `P256`, `P384`, `P521`. (default: `P224`). */ ecdsaCurve?: pulumi.Input<string>; /** * When `algorithm` is `RSA`, the size of the generated RSA key, in bits (default: `2048`). */ rsaBits?: pulumi.Input<number>; }