PrivateKey
Create a PrivateKey Resource
new PrivateKey(name: string, args: PrivateKeyArgs, opts?: CustomResourceOptions);def PrivateKey(resource_name, opts=None, algorithm=None, ecdsa_curve=None, rsa_bits=None, __props__=None);func NewPrivateKey(ctx *Context, name string, args PrivateKeyArgs, opts ...ResourceOption) (*PrivateKey, error)public PrivateKey(string name, PrivateKeyArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args PrivateKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PrivateKeyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PrivateKeyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
PrivateKey Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The PrivateKey resource accepts the following input properties:
- Algorithm string
The name of the algorithm to use for the key. Currently-supported values are “RSA” and “ECDSA”.
- Ecdsa
Curve string When
algorithmis “ECDSA”, the name of the elliptic curve to use. May be any one of “P224”, “P256”, “P384” or “P521”, with “P224” as the default.- Rsa
Bits int When
algorithmis “RSA”, the size of the generated RSA key in bits. Defaults to 2048.
- Algorithm string
The name of the algorithm to use for the key. Currently-supported values are “RSA” and “ECDSA”.
- Ecdsa
Curve string When
algorithmis “ECDSA”, the name of the elliptic curve to use. May be any one of “P224”, “P256”, “P384” or “P521”, with “P224” as the default.- Rsa
Bits int When
algorithmis “RSA”, the size of the generated RSA key in bits. Defaults to 2048.
- algorithm string
The name of the algorithm to use for the key. Currently-supported values are “RSA” and “ECDSA”.
- ecdsa
Curve string When
algorithmis “ECDSA”, the name of the elliptic curve to use. May be any one of “P224”, “P256”, “P384” or “P521”, with “P224” as the default.- rsa
Bits number When
algorithmis “RSA”, the size of the generated RSA key in bits. Defaults to 2048.
- algorithm str
The name of the algorithm to use for the key. Currently-supported values are “RSA” and “ECDSA”.
- ecdsa_
curve str When
algorithmis “ECDSA”, the name of the elliptic curve to use. May be any one of “P224”, “P256”, “P384” or “P521”, with “P224” as the default.- rsa_
bits float When
algorithmis “RSA”, the size of the generated RSA key in bits. Defaults to 2048.
Outputs
All input properties are implicitly available as output properties. Additionally, the PrivateKey resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Private
Key stringPem The private key data in PEM format.
- Public
Key stringFingerprint Md5 The md5 hash 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, as per the rules forpublic_key_openssh.- Public
Key stringOpenssh The public key data in OpenSSH
authorized_keysformat, if the selected private key format is compatible. All RSA keys are supported, and ECDSA keys with curves “P256”, “P384” and “P521” are supported. This attribute is empty if an incompatible ECDSA curve is selected.- Public
Key stringPem The public key data in PEM format.
- Id string
- The provider-assigned unique ID for this managed resource.
- Private
Key stringPem The private key data in PEM format.
- Public
Key stringFingerprint Md5 The md5 hash 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, as per the rules forpublic_key_openssh.- Public
Key stringOpenssh The public key data in OpenSSH
authorized_keysformat, if the selected private key format is compatible. All RSA keys are supported, and ECDSA keys with curves “P256”, “P384” and “P521” are supported. This attribute is empty if an incompatible ECDSA curve is selected.- Public
Key stringPem The public key data in PEM format.
- id string
- The provider-assigned unique ID for this managed resource.
- private
Key stringPem The private key data in PEM format.
- public
Key stringFingerprint Md5 The md5 hash 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, as per the rules forpublic_key_openssh.- public
Key stringOpenssh The public key data in OpenSSH
authorized_keysformat, if the selected private key format is compatible. All RSA keys are supported, and ECDSA keys with curves “P256”, “P384” and “P521” are supported. This attribute is empty if an incompatible ECDSA curve is selected.- public
Key stringPem The public key data in PEM format.
- id str
- The provider-assigned unique ID for this managed resource.
- private_
key_ strpem The private key data in PEM format.
- public_
key_ strfingerprint_ md5 The md5 hash 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, as per the rules forpublic_key_openssh.- public_
key_ stropenssh The public key data in OpenSSH
authorized_keysformat, if the selected private key format is compatible. All RSA keys are supported, and ECDSA keys with curves “P256”, “P384” and “P521” are supported. This attribute is empty if an incompatible ECDSA curve is selected.- public_
key_ strpem The public key data in PEM format.
Look up an Existing PrivateKey Resource
Get an existing PrivateKey resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: PrivateKeyState, opts?: CustomResourceOptions): PrivateKeystatic get(resource_name, id, opts=None, algorithm=None, ecdsa_curve=None, private_key_pem=None, public_key_fingerprint_md5=None, public_key_openssh=None, public_key_pem=None, rsa_bits=None, __props__=None);func GetPrivateKey(ctx *Context, name string, id IDInput, state *PrivateKeyState, opts ...ResourceOption) (*PrivateKey, error)public static PrivateKey Get(string name, Input<string> id, PrivateKeyState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Algorithm string
The name of the algorithm to use for the key. Currently-supported values are “RSA” and “ECDSA”.
- Ecdsa
Curve string When
algorithmis “ECDSA”, the name of the elliptic curve to use. May be any one of “P224”, “P256”, “P384” or “P521”, with “P224” as the default.- Private
Key stringPem The private key data in PEM format.
- Public
Key stringFingerprint Md5 The md5 hash 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, as per the rules forpublic_key_openssh.- Public
Key stringOpenssh The public key data in OpenSSH
authorized_keysformat, if the selected private key format is compatible. All RSA keys are supported, and ECDSA keys with curves “P256”, “P384” and “P521” are supported. This attribute is empty if an incompatible ECDSA curve is selected.- Public
Key stringPem The public key data in PEM format.
- Rsa
Bits int When
algorithmis “RSA”, the size of the generated RSA key in bits. Defaults to 2048.
- Algorithm string
The name of the algorithm to use for the key. Currently-supported values are “RSA” and “ECDSA”.
- Ecdsa
Curve string When
algorithmis “ECDSA”, the name of the elliptic curve to use. May be any one of “P224”, “P256”, “P384” or “P521”, with “P224” as the default.- Private
Key stringPem The private key data in PEM format.
- Public
Key stringFingerprint Md5 The md5 hash 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, as per the rules forpublic_key_openssh.- Public
Key stringOpenssh The public key data in OpenSSH
authorized_keysformat, if the selected private key format is compatible. All RSA keys are supported, and ECDSA keys with curves “P256”, “P384” and “P521” are supported. This attribute is empty if an incompatible ECDSA curve is selected.- Public
Key stringPem The public key data in PEM format.
- Rsa
Bits int When
algorithmis “RSA”, the size of the generated RSA key in bits. Defaults to 2048.
- algorithm string
The name of the algorithm to use for the key. Currently-supported values are “RSA” and “ECDSA”.
- ecdsa
Curve string When
algorithmis “ECDSA”, the name of the elliptic curve to use. May be any one of “P224”, “P256”, “P384” or “P521”, with “P224” as the default.- private
Key stringPem The private key data in PEM format.
- public
Key stringFingerprint Md5 The md5 hash 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, as per the rules forpublic_key_openssh.- public
Key stringOpenssh The public key data in OpenSSH
authorized_keysformat, if the selected private key format is compatible. All RSA keys are supported, and ECDSA keys with curves “P256”, “P384” and “P521” are supported. This attribute is empty if an incompatible ECDSA curve is selected.- public
Key stringPem The public key data in PEM format.
- rsa
Bits number When
algorithmis “RSA”, the size of the generated RSA key in bits. Defaults to 2048.
- algorithm str
The name of the algorithm to use for the key. Currently-supported values are “RSA” and “ECDSA”.
- ecdsa_
curve str When
algorithmis “ECDSA”, the name of the elliptic curve to use. May be any one of “P224”, “P256”, “P384” or “P521”, with “P224” as the default.- private_
key_ strpem The private key data in PEM format.
- public_
key_ strfingerprint_ md5 The md5 hash 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, as per the rules forpublic_key_openssh.- public_
key_ stropenssh The public key data in OpenSSH
authorized_keysformat, if the selected private key format is compatible. All RSA keys are supported, and ECDSA keys with curves “P256”, “P384” and “P521” are supported. This attribute is empty if an incompatible ECDSA curve is selected.- public_
key_ strpem The public key data in PEM format.
- rsa_
bits float When
algorithmis “RSA”, the size of the generated RSA key in bits. Defaults to 2048.
Package Details
- Repository
- https://github.com/pulumi/pulumi-tls
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
tlsTerraform Provider.