Google Cloud Native is in preview. Google Cloud Classic is fully supported.
google-native.secretmanager/v1beta1.Secret
Explore with Pulumi AI
Google Cloud Native is in preview. Google Cloud Classic is fully supported.
Creates a new Secret containing no SecretVersions. Auto-naming is currently not supported for this resource.
Create Secret Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Secret(name: string, args: SecretArgs, opts?: CustomResourceOptions);
@overload
def Secret(resource_name: str,
args: SecretArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Secret(resource_name: str,
opts: Optional[ResourceOptions] = None,
replication: Optional[ReplicationArgs] = None,
secret_id: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
project: Optional[str] = None)
func NewSecret(ctx *Context, name string, args SecretArgs, opts ...ResourceOption) (*Secret, error)
public Secret(string name, SecretArgs args, CustomResourceOptions? opts = null)
public Secret(String name, SecretArgs args)
public Secret(String name, SecretArgs args, CustomResourceOptions options)
type: google-native:secretmanager/v1beta1:Secret
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- 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.
- args SecretArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control 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.
- name String
- The unique name of the resource.
- args SecretArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var google_nativeSecretResource = new GoogleNative.SecretManager.V1Beta1.Secret("google-nativeSecretResource", new()
{
Replication = new GoogleNative.SecretManager.V1Beta1.Inputs.ReplicationArgs
{
Automatic = null,
UserManaged = new GoogleNative.SecretManager.V1Beta1.Inputs.UserManagedArgs
{
Replicas = new[]
{
new GoogleNative.SecretManager.V1Beta1.Inputs.ReplicaArgs
{
Location = "string",
},
},
},
},
SecretId = "string",
Labels =
{
{ "string", "string" },
},
Project = "string",
});
example, err := secretmanagerv1beta1.NewSecret(ctx, "google-nativeSecretResource", &secretmanagerv1beta1.SecretArgs{
Replication: &secretmanager.ReplicationArgs{
Automatic: &secretmanager.AutomaticArgs{},
UserManaged: &secretmanager.UserManagedArgs{
Replicas: secretmanager.ReplicaArray{
&secretmanager.ReplicaArgs{
Location: pulumi.String("string"),
},
},
},
},
SecretId: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Project: pulumi.String("string"),
})
var google_nativeSecretResource = new Secret("google-nativeSecretResource", SecretArgs.builder()
.replication(ReplicationArgs.builder()
.automatic()
.userManaged(UserManagedArgs.builder()
.replicas(ReplicaArgs.builder()
.location("string")
.build())
.build())
.build())
.secretId("string")
.labels(Map.of("string", "string"))
.project("string")
.build());
google_native_secret_resource = google_native.secretmanager.v1beta1.Secret("google-nativeSecretResource",
replication={
"automatic": {},
"user_managed": {
"replicas": [{
"location": "string",
}],
},
},
secret_id="string",
labels={
"string": "string",
},
project="string")
const google_nativeSecretResource = new google_native.secretmanager.v1beta1.Secret("google-nativeSecretResource", {
replication: {
automatic: {},
userManaged: {
replicas: [{
location: "string",
}],
},
},
secretId: "string",
labels: {
string: "string",
},
project: "string",
});
type: google-native:secretmanager/v1beta1:Secret
properties:
labels:
string: string
project: string
replication:
automatic: {}
userManaged:
replicas:
- location: string
secretId: string
Secret Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Secret resource accepts the following input properties:
- Replication
Pulumi.
Google Native. Secret Manager. V1Beta1. Inputs. Replication - Immutable. The replication policy of the secret data attached to the Secret. The replication policy cannot be changed after the Secret has been created.
- Secret
Id string - Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (
-
) and underscore (_
) characters. - 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}{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. - Project string
- Replication
Replication
Args - Immutable. The replication policy of the secret data attached to the Secret. The replication policy cannot be changed after the Secret has been created.
- Secret
Id string - Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (
-
) and underscore (_
) characters. - 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}{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. - Project string
- replication Replication
- Immutable. The replication policy of the secret data attached to the Secret. The replication policy cannot be changed after the Secret has been created.
- secret
Id String - Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (
-
) and underscore (_
) characters. - 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}{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. - project String
- replication Replication
- Immutable. The replication policy of the secret data attached to the Secret. The replication policy cannot be changed after the Secret has been created.
- secret
Id string - Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (
-
) and underscore (_
) characters. - 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}{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. - project string
- replication
Replication
Args - Immutable. The replication policy of the secret data attached to the Secret. The replication policy cannot be changed after the Secret has been created.
- secret_
id str - Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (
-
) and underscore (_
) characters. - labels Mapping[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}{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. - project str
- replication Property Map
- Immutable. The replication policy of the secret data attached to the Secret. The replication policy cannot be changed after the Secret has been created.
- secret
Id String - Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (
-
) and underscore (_
) characters. - labels Map<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}{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. - project String
Outputs
All input properties are implicitly available as output properties. Additionally, the Secret resource produces the following output properties:
- Create
Time 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 in the format
projects/*/secrets/*
.
- Create
Time 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 in the format
projects/*/secrets/*
.
- create
Time 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 in the format
projects/*/secrets/*
.
- create
Time 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 in the format
projects/*/secrets/*
.
- 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 in the format
projects/*/secrets/*
.
- create
Time 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 in the format
projects/*/secrets/*
.
Supporting Types
Replica, ReplicaArgs
- 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 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"
.
- location String
- The canonical IDs of the location to replicate data. For example:
"us-east1"
.
ReplicaResponse, ReplicaResponseArgs
- 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 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"
.
- location String
- The canonical IDs of the location to replicate data. For example:
"us-east1"
.
Replication, ReplicationArgs
- Automatic
Pulumi.
Google Native. Secret Manager. V1Beta1. Inputs. Automatic - The Secret will automatically be replicated without any restrictions.
- User
Managed Pulumi.Google Native. Secret Manager. V1Beta1. Inputs. User Managed - The Secret will only be replicated into the locations specified.
- Automatic Automatic
- The Secret will automatically be replicated without any restrictions.
- User
Managed UserManaged - The Secret will only be replicated into the locations specified.
- automatic Automatic
- The Secret will automatically be replicated without any restrictions.
- user
Managed UserManaged - The Secret will only be replicated into the locations specified.
- automatic Automatic
- The Secret will automatically be replicated without any restrictions.
- user
Managed UserManaged - The Secret will only be replicated into the locations specified.
- automatic Automatic
- The Secret will automatically be replicated without any restrictions.
- user_
managed UserManaged - The Secret will only be replicated into the locations specified.
- automatic Property Map
- The Secret will automatically be replicated without any restrictions.
- user
Managed Property Map - The Secret will only be replicated into the locations specified.
ReplicationResponse, ReplicationResponseArgs
- Automatic
Pulumi.
Google Native. Secret Manager. V1Beta1. Inputs. Automatic Response - The Secret will automatically be replicated without any restrictions.
- User
Managed Pulumi.Google Native. Secret Manager. V1Beta1. Inputs. User Managed Response - The Secret will only be replicated into the locations specified.
- Automatic
Automatic
Response - The Secret will automatically be replicated without any restrictions.
- User
Managed UserManaged Response - The Secret will only be replicated into the locations specified.
- automatic
Automatic
Response - The Secret will automatically be replicated without any restrictions.
- user
Managed UserManaged Response - The Secret will only be replicated into the locations specified.
- automatic
Automatic
Response - The Secret will automatically be replicated without any restrictions.
- user
Managed UserManaged Response - The Secret will only be replicated into the locations specified.
- automatic
Automatic
Response - The Secret will automatically be replicated without any restrictions.
- user_
managed UserManaged Response - The Secret will only be replicated into the locations specified.
- automatic Property Map
- The Secret will automatically be replicated without any restrictions.
- user
Managed Property Map - The Secret will only be replicated into the locations specified.
UserManaged, UserManagedArgs
- Replicas
List<Pulumi.
Google Native. Secret Manager. V1Beta1. Inputs. Replica> - The list of Replicas for this Secret. Cannot be empty.
- replicas List<Replica>
- The list of Replicas for this Secret. Cannot be empty.
- replicas Sequence[Replica]
- The list of Replicas for this Secret. Cannot be empty.
- replicas List<Property Map>
- The list of Replicas for this Secret. Cannot be empty.
UserManagedResponse, UserManagedResponseArgs
- Replicas
List<Pulumi.
Google Native. Secret Manager. V1Beta1. Inputs. Replica Response> - The list of Replicas for this Secret. Cannot be empty.
- Replicas
[]Replica
Response - The list of Replicas for this Secret. Cannot be empty.
- replicas
List<Replica
Response> - The list of Replicas for this Secret. Cannot be empty.
- replicas
Replica
Response[] - The list of Replicas for this Secret. Cannot be empty.
- replicas
Sequence[Replica
Response] - The list of Replicas for this Secret. Cannot be empty.
- replicas List<Property Map>
- The list of Replicas for this Secret. Cannot be empty.
Package Details
- Repository
- Google Cloud Native pulumi/pulumi-google-native
- License
- Apache-2.0
Google Cloud Native is in preview. Google Cloud Classic is fully supported.