Secret
A Secret is a logical secret whose value and versions can be accessed.
To get more information about Secret, see:
Create a Secret Resource
new Secret(name: string, args: SecretArgs, opts?: CustomResourceOptions);def Secret(resource_name, opts=None, labels=None, project=None, replication=None, secret_id=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:
- Replication
Secret
Replication Args The replication policy of the secret data attached to the Secret. It cannot be changed after the Secret has been created. Structure is documented below.
- Secret
Id string This must be unique within the project.
- Labels Dictionary<string, string>
The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}-]{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}-]{0,63} No more than 64 labels can be assigned to a given resource. An object containing a list of “key”: value pairs. Example: { “name”: “wrench”, “mass”: “1.3kg”, “count”: “3” }.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Replication
Secret
Replication The replication policy of the secret data attached to the Secret. It cannot be changed after the Secret has been created. Structure is documented below.
- Secret
Id string This must be unique within the project.
- Labels map[string]string
The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}-]{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}-]{0,63} No more than 64 labels can be assigned to a given resource. An object containing a list of “key”: value pairs. Example: { “name”: “wrench”, “mass”: “1.3kg”, “count”: “3” }.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- replication
Secret
Replication The replication policy of the secret data attached to the Secret. It cannot be changed after the Secret has been created. Structure is documented below.
- secret
Id string This must be unique within the project.
- labels {[key: string]: string}
The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}-]{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}-]{0,63} No more than 64 labels can be assigned to a given resource. An object containing a list of “key”: value pairs. Example: { “name”: “wrench”, “mass”: “1.3kg”, “count”: “3” }.
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- replication
Dict[Secret
Replication] The replication policy of the secret data attached to the Secret. It cannot be changed after the Secret has been created. Structure is documented below.
- secret_
id str This must be unique within the project.
- labels Dict[str, str]
The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}-]{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}-]{0,63} No more than 64 labels can be assigned to a given resource. An object containing a list of “key”: value pairs. Example: { “name”: “wrench”, “mass”: “1.3kg”, “count”: “3” }.
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
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, create_time=None, labels=None, name=None, project=None, replication=None, secret_id=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:
- Create
Time string The time at which the Secret was created.
- Labels Dictionary<string, string>
The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}-]{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}-]{0,63} No more than 64 labels can be assigned to a given resource. An object containing a list of “key”: value pairs. Example: { “name”: “wrench”, “mass”: “1.3kg”, “count”: “3” }.
- Name string
The resource name of the Secret. Format: ‘projects/{{project}}/secrets/{{secret_id}}’
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Replication
Secret
Replication Args The replication policy of the secret data attached to the Secret. It cannot be changed after the Secret has been created. Structure is documented below.
- Secret
Id string This must be unique within the project.
- Create
Time string The time at which the Secret was created.
- Labels map[string]string
The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}-]{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}-]{0,63} No more than 64 labels can be assigned to a given resource. An object containing a list of “key”: value pairs. Example: { “name”: “wrench”, “mass”: “1.3kg”, “count”: “3” }.
- Name string
The resource name of the Secret. Format: ‘projects/{{project}}/secrets/{{secret_id}}’
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Replication
Secret
Replication The replication policy of the secret data attached to the Secret. It cannot be changed after the Secret has been created. Structure is documented below.
- Secret
Id string This must be unique within the project.
- create
Time string The time at which the Secret was created.
- labels {[key: string]: string}
The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}-]{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}-]{0,63} No more than 64 labels can be assigned to a given resource. An object containing a list of “key”: value pairs. Example: { “name”: “wrench”, “mass”: “1.3kg”, “count”: “3” }.
- name string
The resource name of the Secret. Format: ‘projects/{{project}}/secrets/{{secret_id}}’
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- replication
Secret
Replication The replication policy of the secret data attached to the Secret. It cannot be changed after the Secret has been created. Structure is documented below.
- secret
Id string This must be unique within the project.
- create_
time str The time at which the Secret was created.
- labels Dict[str, str]
The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}-]{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}-]{0,63} No more than 64 labels can be assigned to a given resource. An object containing a list of “key”: value pairs. Example: { “name”: “wrench”, “mass”: “1.3kg”, “count”: “3” }.
- name str
The resource name of the Secret. Format: ‘projects/{{project}}/secrets/{{secret_id}}’
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- replication
Dict[Secret
Replication] The replication policy of the secret data attached to the Secret. It cannot be changed after the Secret has been created. Structure is documented below.
- secret_
id str This must be unique within the project.
Supporting Types
SecretReplication
- Automatic bool
The Secret will automatically be replicated without any restrictions.
- User
Managed SecretReplication User Managed Args The Secret will automatically be replicated without any restrictions. Structure is documented below.
- Automatic bool
The Secret will automatically be replicated without any restrictions.
- User
Managed SecretReplication User Managed The Secret will automatically be replicated without any restrictions. Structure is documented below.
- automatic boolean
The Secret will automatically be replicated without any restrictions.
- user
Managed SecretReplication User Managed The Secret will automatically be replicated without any restrictions. Structure is documented below.
- automatic bool
The Secret will automatically be replicated without any restrictions.
- user
Managed Dict[SecretReplication User Managed] The Secret will automatically be replicated without any restrictions. Structure is documented below.
SecretReplicationUserManaged
- Replicas
List<Secret
Replication User Managed Replica Args> The list of Replicas for this Secret. Cannot be empty. Structure is documented below.
- Replicas
[]Secret
Replication User Managed Replica The list of Replicas for this Secret. Cannot be empty. Structure is documented below.
- replicas
Secret
Replication User Managed Replica[] The list of Replicas for this Secret. Cannot be empty. Structure is documented below.
- replicas
List[Secret
Replication User Managed Replica] The list of Replicas for this Secret. Cannot be empty. Structure is documented below.
SecretReplicationUserManagedReplica
Package Details
- Repository
- https://github.com/pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.