Class SecretVersion
A secret version resource.
Warning: All arguments including
payload.secret_datawill be stored in the raw state as plain-text.
Example Usage - Secret Version Basic
using Pulumi;
using Gcp = Pulumi.Gcp;
class MyStack : Stack
{
public MyStack()
{
var secret_basic = new Gcp.SecretManager.Secret("secret-basic", new Gcp.SecretManager.SecretArgs
{
SecretId = "secret-version",
Labels =
{
{ "label", "my-label" },
},
Replication = new Gcp.SecretManager.Inputs.SecretReplicationArgs
{
Automatic = true,
},
});
var secret_version_basic = new Gcp.SecretManager.SecretVersion("secret-version-basic", new Gcp.SecretManager.SecretVersionArgs
{
Secret = secret_basic.Id,
SecretData = "secret-data",
});
}
}
Inherited Members
Namespace: Pulumi.Gcp.SecretManager
Assembly: Pulumi.Gcp.dll
Syntax
public class SecretVersion : CustomResource
Constructors
View SourceSecretVersion(String, SecretVersionArgs, CustomResourceOptions)
Create a SecretVersion resource with the given unique name, arguments, and options.
Declaration
public SecretVersion(string name, SecretVersionArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| SecretVersionArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceCreateTime
The time at which the Secret was created.
Declaration
public Output<string> CreateTime { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
DestroyTime
The time at which the Secret was destroyed. Only present if state is DESTROYED.
Declaration
public Output<string> DestroyTime { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Enabled
The current state of the SecretVersion.
Declaration
public Output<bool?> Enabled { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
Name
The resource name of the SecretVersion. Format: 'projects/{{project}}/secrets/{{secret_id}}/versions/{{version}}'
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Secret
Secret Manager secret resource
Declaration
public Output<string> Secret { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SecretData
The secret data. Must be no larger than 64KiB. Note: This property is sensitive and will not be displayed in the plan.
Declaration
public Output<string> SecretData { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, SecretVersionState, CustomResourceOptions)
Get an existing SecretVersion resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static SecretVersion Get(string name, Input<string> id, SecretVersionState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| SecretVersionState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| SecretVersion |