Secret

Create a Secret Resource

new Secret(name: string, args: SecretArgs, opts?: CustomResourceOptions);
def Secret(resource_name, opts=None, description=None, encryption_key_id=None, force_delete_without_recovery=None, recovery_window_in_days=None, secret_data=None, secret_data_type=None, secret_name=None, tags=None, version_id=None, version_stages=None, __props__=None);
func NewSecret(ctx *Context, name string, args SecretArgs, opts ...ResourceOption) (*Secret, error)
public Secret(string name, SecretArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args SecretArgs
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 SecretArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args SecretArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

Secret Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Secret resource accepts the following input properties:

SecretData string

The value of the secret that you want to create. Secrets Manager encrypts the secret value and stores it in the initial version.

SecretName string

The name of the secret.

VersionId string

The version number of the initial version. Version numbers are unique in each secret object.

Description string

The description of the secret.

EncryptionKeyId string

The ID of the KMS CMK that is used to encrypt the secret value. If you do not specify this parameter, Secrets Manager automatically creates an encryption key to encrypt the secret.

ForceDeleteWithoutRecovery bool

Specifies whether to forcibly delete the secret. If this parameter is set to true, the secret cannot be recovered. Valid values: true, false. Default to: false.

RecoveryWindowInDays int

Specifies the recovery period of the secret if you do not forcibly delete it. Default value: 30. It will be ignored when force_delete_without_recovery is true.

SecretDataType string

The type of the secret value. Valid values: text, binary. Default to “text”.

Tags Dictionary<string, object>

A mapping of tags to assign to the resource.

VersionStages List<string>

) The stage labels that mark the new secret version. If you do not specify this parameter, Secrets Manager marks it with “ACSCurrent”.

SecretData string

The value of the secret that you want to create. Secrets Manager encrypts the secret value and stores it in the initial version.

SecretName string

The name of the secret.

VersionId string

The version number of the initial version. Version numbers are unique in each secret object.

Description string

The description of the secret.

EncryptionKeyId string

The ID of the KMS CMK that is used to encrypt the secret value. If you do not specify this parameter, Secrets Manager automatically creates an encryption key to encrypt the secret.

ForceDeleteWithoutRecovery bool

Specifies whether to forcibly delete the secret. If this parameter is set to true, the secret cannot be recovered. Valid values: true, false. Default to: false.

RecoveryWindowInDays int

Specifies the recovery period of the secret if you do not forcibly delete it. Default value: 30. It will be ignored when force_delete_without_recovery is true.

SecretDataType string

The type of the secret value. Valid values: text, binary. Default to “text”.

Tags map[string]interface{}

A mapping of tags to assign to the resource.

VersionStages []string

) The stage labels that mark the new secret version. If you do not specify this parameter, Secrets Manager marks it with “ACSCurrent”.

secretData string

The value of the secret that you want to create. Secrets Manager encrypts the secret value and stores it in the initial version.

secretName string

The name of the secret.

versionId string

The version number of the initial version. Version numbers are unique in each secret object.

description string

The description of the secret.

encryptionKeyId string

The ID of the KMS CMK that is used to encrypt the secret value. If you do not specify this parameter, Secrets Manager automatically creates an encryption key to encrypt the secret.

forceDeleteWithoutRecovery boolean

Specifies whether to forcibly delete the secret. If this parameter is set to true, the secret cannot be recovered. Valid values: true, false. Default to: false.

recoveryWindowInDays number

Specifies the recovery period of the secret if you do not forcibly delete it. Default value: 30. It will be ignored when force_delete_without_recovery is true.

secretDataType string

The type of the secret value. Valid values: text, binary. Default to “text”.

tags {[key: string]: any}

A mapping of tags to assign to the resource.

versionStages string[]

) The stage labels that mark the new secret version. If you do not specify this parameter, Secrets Manager marks it with “ACSCurrent”.

secret_data str

The value of the secret that you want to create. Secrets Manager encrypts the secret value and stores it in the initial version.

secret_name str

The name of the secret.

version_id str

The version number of the initial version. Version numbers are unique in each secret object.

description str

The description of the secret.

encryption_key_id str

The ID of the KMS CMK that is used to encrypt the secret value. If you do not specify this parameter, Secrets Manager automatically creates an encryption key to encrypt the secret.

force_delete_without_recovery bool

Specifies whether to forcibly delete the secret. If this parameter is set to true, the secret cannot be recovered. Valid values: true, false. Default to: false.

recovery_window_in_days float

Specifies the recovery period of the secret if you do not forcibly delete it. Default value: 30. It will be ignored when force_delete_without_recovery is true.

secret_data_type str

The type of the secret value. Valid values: text, binary. Default to “text”.

tags Dict[str, Any]

A mapping of tags to assign to the resource.

version_stages List[str]

) The stage labels that mark the new secret version. If you do not specify this parameter, Secrets Manager marks it with “ACSCurrent”.

Outputs

All input properties are implicitly available as output properties. Additionally, the Secret resource produces the following output properties:

Arn string

The Alicloud Resource Name (ARN) of the secret.

Id string
The provider-assigned unique ID for this managed resource.
PlannedDeleteTime string

The time when the secret is scheduled to be deleted.

Arn string

The Alicloud Resource Name (ARN) of the secret.

Id string
The provider-assigned unique ID for this managed resource.
PlannedDeleteTime string

The time when the secret is scheduled to be deleted.

arn string

The Alicloud Resource Name (ARN) of the secret.

id string
The provider-assigned unique ID for this managed resource.
plannedDeleteTime string

The time when the secret is scheduled to be deleted.

arn str

The Alicloud Resource Name (ARN) of the secret.

id str
The provider-assigned unique ID for this managed resource.
planned_delete_time str

The time when the secret is scheduled to be deleted.

Look up an Existing Secret Resource

Get an existing Secret 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?: SecretState, opts?: CustomResourceOptions): Secret
static get(resource_name, id, opts=None, arn=None, description=None, encryption_key_id=None, force_delete_without_recovery=None, planned_delete_time=None, recovery_window_in_days=None, secret_data=None, secret_data_type=None, secret_name=None, tags=None, version_id=None, version_stages=None, __props__=None);
func GetSecret(ctx *Context, name string, id IDInput, state *SecretState, opts ...ResourceOption) (*Secret, error)
public static Secret Get(string name, Input<string> id, SecretState? 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:

Arn string

The Alicloud Resource Name (ARN) of the secret.

Description string

The description of the secret.

EncryptionKeyId string

The ID of the KMS CMK that is used to encrypt the secret value. If you do not specify this parameter, Secrets Manager automatically creates an encryption key to encrypt the secret.

ForceDeleteWithoutRecovery bool

Specifies whether to forcibly delete the secret. If this parameter is set to true, the secret cannot be recovered. Valid values: true, false. Default to: false.

PlannedDeleteTime string

The time when the secret is scheduled to be deleted.

RecoveryWindowInDays int

Specifies the recovery period of the secret if you do not forcibly delete it. Default value: 30. It will be ignored when force_delete_without_recovery is true.

SecretData string

The value of the secret that you want to create. Secrets Manager encrypts the secret value and stores it in the initial version.

SecretDataType string

The type of the secret value. Valid values: text, binary. Default to “text”.

SecretName string

The name of the secret.

Tags Dictionary<string, object>

A mapping of tags to assign to the resource.

VersionId string

The version number of the initial version. Version numbers are unique in each secret object.

VersionStages List<string>

) The stage labels that mark the new secret version. If you do not specify this parameter, Secrets Manager marks it with “ACSCurrent”.

Arn string

The Alicloud Resource Name (ARN) of the secret.

Description string

The description of the secret.

EncryptionKeyId string

The ID of the KMS CMK that is used to encrypt the secret value. If you do not specify this parameter, Secrets Manager automatically creates an encryption key to encrypt the secret.

ForceDeleteWithoutRecovery bool

Specifies whether to forcibly delete the secret. If this parameter is set to true, the secret cannot be recovered. Valid values: true, false. Default to: false.

PlannedDeleteTime string

The time when the secret is scheduled to be deleted.

RecoveryWindowInDays int

Specifies the recovery period of the secret if you do not forcibly delete it. Default value: 30. It will be ignored when force_delete_without_recovery is true.

SecretData string

The value of the secret that you want to create. Secrets Manager encrypts the secret value and stores it in the initial version.

SecretDataType string

The type of the secret value. Valid values: text, binary. Default to “text”.

SecretName string

The name of the secret.

Tags map[string]interface{}

A mapping of tags to assign to the resource.

VersionId string

The version number of the initial version. Version numbers are unique in each secret object.

VersionStages []string

) The stage labels that mark the new secret version. If you do not specify this parameter, Secrets Manager marks it with “ACSCurrent”.

arn string

The Alicloud Resource Name (ARN) of the secret.

description string

The description of the secret.

encryptionKeyId string

The ID of the KMS CMK that is used to encrypt the secret value. If you do not specify this parameter, Secrets Manager automatically creates an encryption key to encrypt the secret.

forceDeleteWithoutRecovery boolean

Specifies whether to forcibly delete the secret. If this parameter is set to true, the secret cannot be recovered. Valid values: true, false. Default to: false.

plannedDeleteTime string

The time when the secret is scheduled to be deleted.

recoveryWindowInDays number

Specifies the recovery period of the secret if you do not forcibly delete it. Default value: 30. It will be ignored when force_delete_without_recovery is true.

secretData string

The value of the secret that you want to create. Secrets Manager encrypts the secret value and stores it in the initial version.

secretDataType string

The type of the secret value. Valid values: text, binary. Default to “text”.

secretName string

The name of the secret.

tags {[key: string]: any}

A mapping of tags to assign to the resource.

versionId string

The version number of the initial version. Version numbers are unique in each secret object.

versionStages string[]

) The stage labels that mark the new secret version. If you do not specify this parameter, Secrets Manager marks it with “ACSCurrent”.

arn str

The Alicloud Resource Name (ARN) of the secret.

description str

The description of the secret.

encryption_key_id str

The ID of the KMS CMK that is used to encrypt the secret value. If you do not specify this parameter, Secrets Manager automatically creates an encryption key to encrypt the secret.

force_delete_without_recovery bool

Specifies whether to forcibly delete the secret. If this parameter is set to true, the secret cannot be recovered. Valid values: true, false. Default to: false.

planned_delete_time str

The time when the secret is scheduled to be deleted.

recovery_window_in_days float

Specifies the recovery period of the secret if you do not forcibly delete it. Default value: 30. It will be ignored when force_delete_without_recovery is true.

secret_data str

The value of the secret that you want to create. Secrets Manager encrypts the secret value and stores it in the initial version.

secret_data_type str

The type of the secret value. Valid values: text, binary. Default to “text”.

secret_name str

The name of the secret.

tags Dict[str, Any]

A mapping of tags to assign to the resource.

version_id str

The version number of the initial version. Version numbers are unique in each secret object.

version_stages List[str]

) The stage labels that mark the new secret version. If you do not specify this parameter, Secrets Manager marks it with “ACSCurrent”.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.