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 SecretReplicationArgs

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.

SecretId 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 SecretReplication

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.

SecretId 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 SecretReplication

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.

secretId 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[SecretReplication]

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:

CreateTime string

The time at which the Secret was created.

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

The resource name of the Secret. Format: ‘projects/{{project}}/secrets/{{secret_id}}’

CreateTime string

The time at which the Secret was created.

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

The resource name of the Secret. Format: ‘projects/{{project}}/secrets/{{secret_id}}’

createTime string

The time at which the Secret was created.

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

The resource name of the Secret. Format: ‘projects/{{project}}/secrets/{{secret_id}}’

create_time str

The time at which the Secret was created.

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

The resource name of the Secret. Format: ‘projects/{{project}}/secrets/{{secret_id}}’

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, 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:

CreateTime 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 SecretReplicationArgs

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.

SecretId string

This must be unique within the project.

CreateTime 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 SecretReplication

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.

SecretId string

This must be unique within the project.

createTime 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 SecretReplication

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.

secretId 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[SecretReplication]

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

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Automatic bool

The Secret will automatically be replicated without any restrictions.

UserManaged SecretReplicationUserManagedArgs

The Secret will automatically be replicated without any restrictions. Structure is documented below.

Automatic bool

The Secret will automatically be replicated without any restrictions.

UserManaged SecretReplicationUserManaged

The Secret will automatically be replicated without any restrictions. Structure is documented below.

automatic boolean

The Secret will automatically be replicated without any restrictions.

userManaged SecretReplicationUserManaged

The Secret will automatically be replicated without any restrictions. Structure is documented below.

automatic bool

The Secret will automatically be replicated without any restrictions.

userManaged Dict[SecretReplicationUserManaged]

The Secret will automatically be replicated without any restrictions. Structure is documented below.

SecretReplicationUserManaged

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Replicas List<SecretReplicationUserManagedReplicaArgs>

The list of Replicas for this Secret. Cannot be empty. Structure is documented below.

Replicas []SecretReplicationUserManagedReplica

The list of Replicas for this Secret. Cannot be empty. Structure is documented below.

replicas SecretReplicationUserManagedReplica[]

The list of Replicas for this Secret. Cannot be empty. Structure is documented below.

replicas List[SecretReplicationUserManagedReplica]

The list of Replicas for this Secret. Cannot be empty. Structure is documented below.

SecretReplicationUserManagedReplica

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Location string

The canonical IDs of the location to replicate data. For example: “us-east1”.

Location string

The canonical IDs of the location to replicate data. For example: “us-east1”.

location string

The canonical IDs of the location to replicate data. For example: “us-east1”.

location str

The canonical IDs of the location to replicate data. For example: “us-east1”.

Package Details

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