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:
- Secret
Data string 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 string The name of the secret.
- Version
Id string The version number of the initial version. Version numbers are unique in each secret object.
- Description string
The description of the secret.
- Encryption
Key stringId 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 boolWithout Recovery 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 intIn Days 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_recoveryis true.- Secret
Data stringType The type of the secret value. Valid values: text, binary. Default to “text”.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Version
Stages List<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 string 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 string The name of the secret.
- Version
Id string The version number of the initial version. Version numbers are unique in each secret object.
- Description string
The description of the secret.
- Encryption
Key stringId 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 boolWithout Recovery 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 intIn Days 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_recoveryis true.- Secret
Data stringType The type of the secret value. Valid values: text, binary. Default to “text”.
- map[string]interface{}
A mapping of tags to assign to the resource.
- Version
Stages []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 string 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 string The name of the secret.
- version
Id string The version number of the initial version. Version numbers are unique in each secret object.
- description string
The description of the secret.
- encryption
Key stringId 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 booleanWithout Recovery 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 numberIn Days 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_recoveryis true.- secret
Data stringType The type of the secret value. Valid values: text, binary. Default to “text”.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- version
Stages 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_ strid 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_ boolwithout_ recovery 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_ floatin_ days 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_recoveryis true.- secret_
data_ strtype The type of the secret value. Valid values: text, binary. Default to “text”.
- 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:
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): Secretstatic 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.
- Encryption
Key stringId 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 boolWithout Recovery 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 stringTime The time when the secret is scheduled to be deleted.
- Recovery
Window intIn Days 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_recoveryis true.- Secret
Data string 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 stringType The type of the secret value. Valid values: text, binary. Default to “text”.
- Secret
Name string The name of the secret.
- Dictionary<string, object>
A mapping of tags to assign to the resource.
- Version
Id string The version number of the initial version. Version numbers are unique in each secret object.
- Version
Stages 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.
- Encryption
Key stringId 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 boolWithout Recovery 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 stringTime The time when the secret is scheduled to be deleted.
- Recovery
Window intIn Days 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_recoveryis true.- Secret
Data string 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 stringType The type of the secret value. Valid values: text, binary. Default to “text”.
- Secret
Name string The name of the secret.
- map[string]interface{}
A mapping of tags to assign to the resource.
- Version
Id string The version number of the initial version. Version numbers are unique in each secret object.
- Version
Stages []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.
- encryption
Key stringId 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 booleanWithout Recovery 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 stringTime The time when the secret is scheduled to be deleted.
- recovery
Window numberIn Days 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_recoveryis true.- secret
Data string 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 stringType The type of the secret value. Valid values: text, binary. Default to “text”.
- secret
Name string The name of the secret.
- {[key: string]: any}
A mapping of tags to assign to the resource.
- version
Id string The version number of the initial version. Version numbers are unique in each secret object.
- version
Stages 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_ strid 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_ boolwithout_ recovery 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_ strtime The time when the secret is scheduled to be deleted.
- recovery_
window_ floatin_ days 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_recoveryis 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_ strtype The type of the secret value. Valid values: text, binary. Default to “text”.
- secret_
name str The name of the secret.
- 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
alicloudTerraform Provider.