gcp.secretmanager.Secret
Explore with Pulumi AI
A Secret is a logical secret whose value and versions can be accessed.
To get more information about Secret, see:
Example Usage
Secret Config Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const secret_basic = new gcp.secretmanager.Secret("secret-basic", {
secretId: "secret",
labels: {
label: "my-label",
},
replication: {
userManaged: {
replicas: [
{
location: "us-central1",
},
{
location: "us-east1",
},
],
},
},
});
import pulumi
import pulumi_gcp as gcp
secret_basic = gcp.secretmanager.Secret("secret-basic",
secret_id="secret",
labels={
"label": "my-label",
},
replication={
"user_managed": {
"replicas": [
{
"location": "us-central1",
},
{
"location": "us-east1",
},
],
},
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/secretmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := secretmanager.NewSecret(ctx, "secret-basic", &secretmanager.SecretArgs{
SecretId: pulumi.String("secret"),
Labels: pulumi.StringMap{
"label": pulumi.String("my-label"),
},
Replication: &secretmanager.SecretReplicationArgs{
UserManaged: &secretmanager.SecretReplicationUserManagedArgs{
Replicas: secretmanager.SecretReplicationUserManagedReplicaArray{
&secretmanager.SecretReplicationUserManagedReplicaArgs{
Location: pulumi.String("us-central1"),
},
&secretmanager.SecretReplicationUserManagedReplicaArgs{
Location: pulumi.String("us-east1"),
},
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var secret_basic = new Gcp.SecretManager.Secret("secret-basic", new()
{
SecretId = "secret",
Labels =
{
{ "label", "my-label" },
},
Replication = new Gcp.SecretManager.Inputs.SecretReplicationArgs
{
UserManaged = new Gcp.SecretManager.Inputs.SecretReplicationUserManagedArgs
{
Replicas = new[]
{
new Gcp.SecretManager.Inputs.SecretReplicationUserManagedReplicaArgs
{
Location = "us-central1",
},
new Gcp.SecretManager.Inputs.SecretReplicationUserManagedReplicaArgs
{
Location = "us-east1",
},
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.secretmanager.Secret;
import com.pulumi.gcp.secretmanager.SecretArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationUserManagedArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var secret_basic = new Secret("secret-basic", SecretArgs.builder()
.secretId("secret")
.labels(Map.of("label", "my-label"))
.replication(SecretReplicationArgs.builder()
.userManaged(SecretReplicationUserManagedArgs.builder()
.replicas(
SecretReplicationUserManagedReplicaArgs.builder()
.location("us-central1")
.build(),
SecretReplicationUserManagedReplicaArgs.builder()
.location("us-east1")
.build())
.build())
.build())
.build());
}
}
resources:
secret-basic:
type: gcp:secretmanager:Secret
properties:
secretId: secret
labels:
label: my-label
replication:
userManaged:
replicas:
- location: us-central1
- location: us-east1
Secret With Annotations
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const secret_with_annotations = new gcp.secretmanager.Secret("secret-with-annotations", {
secretId: "secret",
labels: {
label: "my-label",
},
annotations: {
key1: "someval",
key2: "someval2",
key3: "someval3",
key4: "someval4",
key5: "someval5",
},
replication: {
auto: {},
},
});
import pulumi
import pulumi_gcp as gcp
secret_with_annotations = gcp.secretmanager.Secret("secret-with-annotations",
secret_id="secret",
labels={
"label": "my-label",
},
annotations={
"key1": "someval",
"key2": "someval2",
"key3": "someval3",
"key4": "someval4",
"key5": "someval5",
},
replication={
"auto": {},
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/secretmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := secretmanager.NewSecret(ctx, "secret-with-annotations", &secretmanager.SecretArgs{
SecretId: pulumi.String("secret"),
Labels: pulumi.StringMap{
"label": pulumi.String("my-label"),
},
Annotations: pulumi.StringMap{
"key1": pulumi.String("someval"),
"key2": pulumi.String("someval2"),
"key3": pulumi.String("someval3"),
"key4": pulumi.String("someval4"),
"key5": pulumi.String("someval5"),
},
Replication: &secretmanager.SecretReplicationArgs{
Auto: nil,
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var secret_with_annotations = new Gcp.SecretManager.Secret("secret-with-annotations", new()
{
SecretId = "secret",
Labels =
{
{ "label", "my-label" },
},
Annotations =
{
{ "key1", "someval" },
{ "key2", "someval2" },
{ "key3", "someval3" },
{ "key4", "someval4" },
{ "key5", "someval5" },
},
Replication = new Gcp.SecretManager.Inputs.SecretReplicationArgs
{
Auto = null,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.secretmanager.Secret;
import com.pulumi.gcp.secretmanager.SecretArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationAutoArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var secret_with_annotations = new Secret("secret-with-annotations", SecretArgs.builder()
.secretId("secret")
.labels(Map.of("label", "my-label"))
.annotations(Map.ofEntries(
Map.entry("key1", "someval"),
Map.entry("key2", "someval2"),
Map.entry("key3", "someval3"),
Map.entry("key4", "someval4"),
Map.entry("key5", "someval5")
))
.replication(SecretReplicationArgs.builder()
.auto()
.build())
.build());
}
}
resources:
secret-with-annotations:
type: gcp:secretmanager:Secret
properties:
secretId: secret
labels:
label: my-label
annotations:
key1: someval
key2: someval2
key3: someval3
key4: someval4
key5: someval5
replication:
auto: {}
Secret With Version Destroy Ttl
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const secret_with_version_destroy_ttl = new gcp.secretmanager.Secret("secret-with-version-destroy-ttl", {
secretId: "secret",
versionDestroyTtl: "2592000s",
replication: {
auto: {},
},
});
import pulumi
import pulumi_gcp as gcp
secret_with_version_destroy_ttl = gcp.secretmanager.Secret("secret-with-version-destroy-ttl",
secret_id="secret",
version_destroy_ttl="2592000s",
replication={
"auto": {},
})
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/secretmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := secretmanager.NewSecret(ctx, "secret-with-version-destroy-ttl", &secretmanager.SecretArgs{
SecretId: pulumi.String("secret"),
VersionDestroyTtl: pulumi.String("2592000s"),
Replication: &secretmanager.SecretReplicationArgs{
Auto: nil,
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var secret_with_version_destroy_ttl = new Gcp.SecretManager.Secret("secret-with-version-destroy-ttl", new()
{
SecretId = "secret",
VersionDestroyTtl = "2592000s",
Replication = new Gcp.SecretManager.Inputs.SecretReplicationArgs
{
Auto = null,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.secretmanager.Secret;
import com.pulumi.gcp.secretmanager.SecretArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationAutoArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var secret_with_version_destroy_ttl = new Secret("secret-with-version-destroy-ttl", SecretArgs.builder()
.secretId("secret")
.versionDestroyTtl("2592000s")
.replication(SecretReplicationArgs.builder()
.auto()
.build())
.build());
}
}
resources:
secret-with-version-destroy-ttl:
type: gcp:secretmanager:Secret
properties:
secretId: secret
versionDestroyTtl: 2592000s
replication:
auto: {}
Secret With Automatic Cmek
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const project = gcp.organizations.getProject({});
const kms_secret_binding = new gcp.kms.CryptoKeyIAMMember("kms-secret-binding", {
cryptoKeyId: "kms-key",
role: "roles/cloudkms.cryptoKeyEncrypterDecrypter",
member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-secretmanager.iam.gserviceaccount.com`),
});
const secret_with_automatic_cmek = new gcp.secretmanager.Secret("secret-with-automatic-cmek", {
secretId: "secret",
replication: {
auto: {
customerManagedEncryption: {
kmsKeyName: "kms-key",
},
},
},
}, {
dependsOn: [kms_secret_binding],
});
import pulumi
import pulumi_gcp as gcp
project = gcp.organizations.get_project()
kms_secret_binding = gcp.kms.CryptoKeyIAMMember("kms-secret-binding",
crypto_key_id="kms-key",
role="roles/cloudkms.cryptoKeyEncrypterDecrypter",
member=f"serviceAccount:service-{project.number}@gcp-sa-secretmanager.iam.gserviceaccount.com")
secret_with_automatic_cmek = gcp.secretmanager.Secret("secret-with-automatic-cmek",
secret_id="secret",
replication={
"auto": {
"customer_managed_encryption": {
"kms_key_name": "kms-key",
},
},
},
opts = pulumi.ResourceOptions(depends_on=[kms_secret_binding]))
package main
import (
"fmt"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/kms"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/secretmanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
project, err := organizations.LookupProject(ctx, nil, nil)
if err != nil {
return err
}
_, err = kms.NewCryptoKeyIAMMember(ctx, "kms-secret-binding", &kms.CryptoKeyIAMMemberArgs{
CryptoKeyId: pulumi.String("kms-key"),
Role: pulumi.String("roles/cloudkms.cryptoKeyEncrypterDecrypter"),
Member: pulumi.Sprintf("serviceAccount:service-%v@gcp-sa-secretmanager.iam.gserviceaccount.com", project.Number),
})
if err != nil {
return err
}
_, err = secretmanager.NewSecret(ctx, "secret-with-automatic-cmek", &secretmanager.SecretArgs{
SecretId: pulumi.String("secret"),
Replication: &secretmanager.SecretReplicationArgs{
Auto: &secretmanager.SecretReplicationAutoArgs{
CustomerManagedEncryption: &secretmanager.SecretReplicationAutoCustomerManagedEncryptionArgs{
KmsKeyName: pulumi.String("kms-key"),
},
},
},
}, pulumi.DependsOn([]pulumi.Resource{
kms_secret_binding,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var project = Gcp.Organizations.GetProject.Invoke();
var kms_secret_binding = new Gcp.Kms.CryptoKeyIAMMember("kms-secret-binding", new()
{
CryptoKeyId = "kms-key",
Role = "roles/cloudkms.cryptoKeyEncrypterDecrypter",
Member = $"serviceAccount:service-{project.Apply(getProjectResult => getProjectResult.Number)}@gcp-sa-secretmanager.iam.gserviceaccount.com",
});
var secret_with_automatic_cmek = new Gcp.SecretManager.Secret("secret-with-automatic-cmek", new()
{
SecretId = "secret",
Replication = new Gcp.SecretManager.Inputs.SecretReplicationArgs
{
Auto = new Gcp.SecretManager.Inputs.SecretReplicationAutoArgs
{
CustomerManagedEncryption = new Gcp.SecretManager.Inputs.SecretReplicationAutoCustomerManagedEncryptionArgs
{
KmsKeyName = "kms-key",
},
},
},
}, new CustomResourceOptions
{
DependsOn =
{
kms_secret_binding,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.organizations.OrganizationsFunctions;
import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
import com.pulumi.gcp.kms.CryptoKeyIAMMember;
import com.pulumi.gcp.kms.CryptoKeyIAMMemberArgs;
import com.pulumi.gcp.secretmanager.Secret;
import com.pulumi.gcp.secretmanager.SecretArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationAutoArgs;
import com.pulumi.gcp.secretmanager.inputs.SecretReplicationAutoCustomerManagedEncryptionArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var project = OrganizationsFunctions.getProject();
var kms_secret_binding = new CryptoKeyIAMMember("kms-secret-binding", CryptoKeyIAMMemberArgs.builder()
.cryptoKeyId("kms-key")
.role("roles/cloudkms.cryptoKeyEncrypterDecrypter")
.member(String.format("serviceAccount:service-%s@gcp-sa-secretmanager.iam.gserviceaccount.com", project.applyValue(getProjectResult -> getProjectResult.number())))
.build());
var secret_with_automatic_cmek = new Secret("secret-with-automatic-cmek", SecretArgs.builder()
.secretId("secret")
.replication(SecretReplicationArgs.builder()
.auto(SecretReplicationAutoArgs.builder()
.customerManagedEncryption(SecretReplicationAutoCustomerManagedEncryptionArgs.builder()
.kmsKeyName("kms-key")
.build())
.build())
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(kms_secret_binding)
.build());
}
}
resources:
kms-secret-binding:
type: gcp:kms:CryptoKeyIAMMember
properties:
cryptoKeyId: kms-key
role: roles/cloudkms.cryptoKeyEncrypterDecrypter
member: serviceAccount:service-${project.number}@gcp-sa-secretmanager.iam.gserviceaccount.com
secret-with-automatic-cmek:
type: gcp:secretmanager:Secret
properties:
secretId: secret
replication:
auto:
customerManagedEncryption:
kmsKeyName: kms-key
options:
dependson:
- ${["kms-secret-binding"]}
variables:
project:
fn::invoke:
Function: gcp:organizations:getProject
Arguments: {}
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[SecretReplicationArgs] = None,
secret_id: Optional[str] = None,
annotations: Optional[Mapping[str, str]] = None,
expire_time: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
project: Optional[str] = None,
rotation: Optional[SecretRotationArgs] = None,
topics: Optional[Sequence[SecretTopicArgs]] = None,
ttl: Optional[str] = None,
version_aliases: Optional[Mapping[str, str]] = None,
version_destroy_ttl: 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: gcp:secretmanager: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 secretResource = new Gcp.SecretManager.Secret("secretResource", new()
{
Replication = new Gcp.SecretManager.Inputs.SecretReplicationArgs
{
Auto = new Gcp.SecretManager.Inputs.SecretReplicationAutoArgs
{
CustomerManagedEncryption = new Gcp.SecretManager.Inputs.SecretReplicationAutoCustomerManagedEncryptionArgs
{
KmsKeyName = "string",
},
},
UserManaged = new Gcp.SecretManager.Inputs.SecretReplicationUserManagedArgs
{
Replicas = new[]
{
new Gcp.SecretManager.Inputs.SecretReplicationUserManagedReplicaArgs
{
Location = "string",
CustomerManagedEncryption = new Gcp.SecretManager.Inputs.SecretReplicationUserManagedReplicaCustomerManagedEncryptionArgs
{
KmsKeyName = "string",
},
},
},
},
},
SecretId = "string",
Annotations =
{
{ "string", "string" },
},
ExpireTime = "string",
Labels =
{
{ "string", "string" },
},
Project = "string",
Rotation = new Gcp.SecretManager.Inputs.SecretRotationArgs
{
NextRotationTime = "string",
RotationPeriod = "string",
},
Topics = new[]
{
new Gcp.SecretManager.Inputs.SecretTopicArgs
{
Name = "string",
},
},
Ttl = "string",
VersionAliases =
{
{ "string", "string" },
},
VersionDestroyTtl = "string",
});
example, err := secretmanager.NewSecret(ctx, "secretResource", &secretmanager.SecretArgs{
Replication: &secretmanager.SecretReplicationArgs{
Auto: &secretmanager.SecretReplicationAutoArgs{
CustomerManagedEncryption: &secretmanager.SecretReplicationAutoCustomerManagedEncryptionArgs{
KmsKeyName: pulumi.String("string"),
},
},
UserManaged: &secretmanager.SecretReplicationUserManagedArgs{
Replicas: secretmanager.SecretReplicationUserManagedReplicaArray{
&secretmanager.SecretReplicationUserManagedReplicaArgs{
Location: pulumi.String("string"),
CustomerManagedEncryption: &secretmanager.SecretReplicationUserManagedReplicaCustomerManagedEncryptionArgs{
KmsKeyName: pulumi.String("string"),
},
},
},
},
},
SecretId: pulumi.String("string"),
Annotations: pulumi.StringMap{
"string": pulumi.String("string"),
},
ExpireTime: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Project: pulumi.String("string"),
Rotation: &secretmanager.SecretRotationArgs{
NextRotationTime: pulumi.String("string"),
RotationPeriod: pulumi.String("string"),
},
Topics: secretmanager.SecretTopicArray{
&secretmanager.SecretTopicArgs{
Name: pulumi.String("string"),
},
},
Ttl: pulumi.String("string"),
VersionAliases: pulumi.StringMap{
"string": pulumi.String("string"),
},
VersionDestroyTtl: pulumi.String("string"),
})
var secretResource = new Secret("secretResource", SecretArgs.builder()
.replication(SecretReplicationArgs.builder()
.auto(SecretReplicationAutoArgs.builder()
.customerManagedEncryption(SecretReplicationAutoCustomerManagedEncryptionArgs.builder()
.kmsKeyName("string")
.build())
.build())
.userManaged(SecretReplicationUserManagedArgs.builder()
.replicas(SecretReplicationUserManagedReplicaArgs.builder()
.location("string")
.customerManagedEncryption(SecretReplicationUserManagedReplicaCustomerManagedEncryptionArgs.builder()
.kmsKeyName("string")
.build())
.build())
.build())
.build())
.secretId("string")
.annotations(Map.of("string", "string"))
.expireTime("string")
.labels(Map.of("string", "string"))
.project("string")
.rotation(SecretRotationArgs.builder()
.nextRotationTime("string")
.rotationPeriod("string")
.build())
.topics(SecretTopicArgs.builder()
.name("string")
.build())
.ttl("string")
.versionAliases(Map.of("string", "string"))
.versionDestroyTtl("string")
.build());
secret_resource = gcp.secretmanager.Secret("secretResource",
replication={
"auto": {
"customerManagedEncryption": {
"kmsKeyName": "string",
},
},
"userManaged": {
"replicas": [{
"location": "string",
"customerManagedEncryption": {
"kmsKeyName": "string",
},
}],
},
},
secret_id="string",
annotations={
"string": "string",
},
expire_time="string",
labels={
"string": "string",
},
project="string",
rotation={
"nextRotationTime": "string",
"rotationPeriod": "string",
},
topics=[{
"name": "string",
}],
ttl="string",
version_aliases={
"string": "string",
},
version_destroy_ttl="string")
const secretResource = new gcp.secretmanager.Secret("secretResource", {
replication: {
auto: {
customerManagedEncryption: {
kmsKeyName: "string",
},
},
userManaged: {
replicas: [{
location: "string",
customerManagedEncryption: {
kmsKeyName: "string",
},
}],
},
},
secretId: "string",
annotations: {
string: "string",
},
expireTime: "string",
labels: {
string: "string",
},
project: "string",
rotation: {
nextRotationTime: "string",
rotationPeriod: "string",
},
topics: [{
name: "string",
}],
ttl: "string",
versionAliases: {
string: "string",
},
versionDestroyTtl: "string",
});
type: gcp:secretmanager:Secret
properties:
annotations:
string: string
expireTime: string
labels:
string: string
project: string
replication:
auto:
customerManagedEncryption:
kmsKeyName: string
userManaged:
replicas:
- customerManagedEncryption:
kmsKeyName: string
location: string
rotation:
nextRotationTime: string
rotationPeriod: string
secretId: string
topics:
- name: string
ttl: string
versionAliases:
string: string
versionDestroyTtl: 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
The Secret resource accepts the following input properties:
- 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.
- Annotations Dictionary<string, string>
- Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
- Expire
Time string - Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". Only one of 'expire_time' or 'ttl' can be provided.
- 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" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- Project string
- Rotation
Secret
Rotation - The rotation time and period for a Secret. At 'next_rotation_time', Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. 'topics' must be set to configure rotation.
- Topics
List<Secret
Topic> - A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.
- Ttl string
- The TTL for the Secret. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". Only one of 'ttl' or 'expire_time' can be provided.
- Version
Aliases Dictionary<string, string> - Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (-) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
- Version
Destroy stringTtl - Secret Version TTL after destruction request. This is a part of the delayed delete feature on Secret Version. For secret with versionDestroyTtl>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and the actual destruction happens after this TTL expires.
- 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.
- Annotations map[string]string
- Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
- Expire
Time string - Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". Only one of 'expire_time' or 'ttl' can be provided.
- 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" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- Project string
- Rotation
Secret
Rotation Args - The rotation time and period for a Secret. At 'next_rotation_time', Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. 'topics' must be set to configure rotation.
- Topics
[]Secret
Topic Args - A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.
- Ttl string
- The TTL for the Secret. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". Only one of 'ttl' or 'expire_time' can be provided.
- Version
Aliases map[string]string - Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (-) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
- Version
Destroy stringTtl - Secret Version TTL after destruction request. This is a part of the delayed delete feature on Secret Version. For secret with versionDestroyTtl>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and the actual destruction happens after this TTL expires.
- 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.
- annotations Map<String,String>
- Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
- expire
Time String - Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". Only one of 'expire_time' or 'ttl' can be provided.
- 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" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- project String
- rotation
Secret
Rotation - The rotation time and period for a Secret. At 'next_rotation_time', Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. 'topics' must be set to configure rotation.
- topics
List<Secret
Topic> - A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.
- ttl String
- The TTL for the Secret. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". Only one of 'ttl' or 'expire_time' can be provided.
- version
Aliases Map<String,String> - Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (-) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
- version
Destroy StringTtl - Secret Version TTL after destruction request. This is a part of the delayed delete feature on Secret Version. For secret with versionDestroyTtl>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and the actual destruction happens after this TTL expires.
- 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.
- annotations {[key: string]: string}
- Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
- expire
Time string - Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". Only one of 'expire_time' or 'ttl' can be provided.
- 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" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- project string
- rotation
Secret
Rotation - The rotation time and period for a Secret. At 'next_rotation_time', Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. 'topics' must be set to configure rotation.
- topics
Secret
Topic[] - A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.
- ttl string
- The TTL for the Secret. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". Only one of 'ttl' or 'expire_time' can be provided.
- version
Aliases {[key: string]: string} - Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (-) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
- version
Destroy stringTtl - Secret Version TTL after destruction request. This is a part of the delayed delete feature on Secret Version. For secret with versionDestroyTtl>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and the actual destruction happens after this TTL expires.
- 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 str - This must be unique within the project.
- annotations Mapping[str, str]
- Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
- expire_
time str - Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". Only one of 'expire_time' or 'ttl' can be provided.
- 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}][\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" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- project str
- rotation
Secret
Rotation Args - The rotation time and period for a Secret. At 'next_rotation_time', Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. 'topics' must be set to configure rotation.
- topics
Sequence[Secret
Topic Args] - A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.
- ttl str
- The TTL for the Secret. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". Only one of 'ttl' or 'expire_time' can be provided.
- version_
aliases Mapping[str, str] - Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (-) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
- version_
destroy_ strttl - Secret Version TTL after destruction request. This is a part of the delayed delete feature on Secret Version. For secret with versionDestroyTtl>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and the actual destruction happens after this TTL expires.
- replication Property Map
- 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.
- annotations Map<String>
- Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
- expire
Time String - Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". Only one of 'expire_time' or 'ttl' can be provided.
- 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}][\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" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- project String
- rotation Property Map
- The rotation time and period for a Secret. At 'next_rotation_time', Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. 'topics' must be set to configure rotation.
- topics List<Property Map>
- A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.
- ttl String
- The TTL for the Secret. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". Only one of 'ttl' or 'expire_time' can be provided.
- version
Aliases Map<String> - Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (-) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
- version
Destroy StringTtl - Secret Version TTL after destruction request. This is a part of the delayed delete feature on Secret Version. For secret with versionDestroyTtl>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and the actual destruction happens after this TTL expires.
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.
- Effective
Annotations Dictionary<string, string> - Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- 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}}
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Create
Time string - The time at which the Secret was created.
- Effective
Annotations map[string]string - Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- 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}}
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- create
Time String - The time at which the Secret was created.
- effective
Annotations Map<String,String> - effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- 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}}
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- create
Time string - The time at which the Secret was created.
- effective
Annotations {[key: string]: string} - effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- 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}}
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- create_
time str - The time at which the Secret was created.
- effective_
annotations Mapping[str, str] - effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- 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}}
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- create
Time String - The time at which the Secret was created.
- effective
Annotations Map<String> - effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- 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}}
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
Look up 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
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
annotations: Optional[Mapping[str, str]] = None,
create_time: Optional[str] = None,
effective_annotations: Optional[Mapping[str, str]] = None,
effective_labels: Optional[Mapping[str, str]] = None,
expire_time: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
name: Optional[str] = None,
project: Optional[str] = None,
pulumi_labels: Optional[Mapping[str, str]] = None,
replication: Optional[SecretReplicationArgs] = None,
rotation: Optional[SecretRotationArgs] = None,
secret_id: Optional[str] = None,
topics: Optional[Sequence[SecretTopicArgs]] = None,
ttl: Optional[str] = None,
version_aliases: Optional[Mapping[str, str]] = None,
version_destroy_ttl: Optional[str] = None) -> Secret
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)
public static Secret get(String name, Output<String> id, SecretState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- Annotations Dictionary<string, string>
- Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
- Create
Time string - The time at which the Secret was created.
- Effective
Annotations Dictionary<string, string> - Effective
Labels Dictionary<string, string> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Expire
Time string - Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". Only one of 'expire_time' or 'ttl' can be provided.
- 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" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- Name string
- The resource name of the Secret. Format:
projects/{{project}}/secrets/{{secret_id}}
- Project string
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- 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.
- Rotation
Secret
Rotation - The rotation time and period for a Secret. At 'next_rotation_time', Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. 'topics' must be set to configure rotation.
- Secret
Id string - This must be unique within the project.
- Topics
List<Secret
Topic> - A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.
- Ttl string
- The TTL for the Secret. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". Only one of 'ttl' or 'expire_time' can be provided.
- Version
Aliases Dictionary<string, string> - Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (-) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
- Version
Destroy stringTtl - Secret Version TTL after destruction request. This is a part of the delayed delete feature on Secret Version. For secret with versionDestroyTtl>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and the actual destruction happens after this TTL expires.
- Annotations map[string]string
- Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
- Create
Time string - The time at which the Secret was created.
- Effective
Annotations map[string]string - Effective
Labels map[string]string - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- Expire
Time string - Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". Only one of 'expire_time' or 'ttl' can be provided.
- 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" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- Name string
- The resource name of the Secret. Format:
projects/{{project}}/secrets/{{secret_id}}
- Project string
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- 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.
- Rotation
Secret
Rotation Args - The rotation time and period for a Secret. At 'next_rotation_time', Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. 'topics' must be set to configure rotation.
- Secret
Id string - This must be unique within the project.
- Topics
[]Secret
Topic Args - A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.
- Ttl string
- The TTL for the Secret. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". Only one of 'ttl' or 'expire_time' can be provided.
- Version
Aliases map[string]string - Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (-) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
- Version
Destroy stringTtl - Secret Version TTL after destruction request. This is a part of the delayed delete feature on Secret Version. For secret with versionDestroyTtl>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and the actual destruction happens after this TTL expires.
- annotations Map<String,String>
- Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
- create
Time String - The time at which the Secret was created.
- effective
Annotations Map<String,String> - effective
Labels Map<String,String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- expire
Time String - Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". Only one of 'expire_time' or 'ttl' can be provided.
- 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" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- name String
- The resource name of the Secret. Format:
projects/{{project}}/secrets/{{secret_id}}
- project String
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- 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.
- rotation
Secret
Rotation - The rotation time and period for a Secret. At 'next_rotation_time', Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. 'topics' must be set to configure rotation.
- secret
Id String - This must be unique within the project.
- topics
List<Secret
Topic> - A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.
- ttl String
- The TTL for the Secret. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". Only one of 'ttl' or 'expire_time' can be provided.
- version
Aliases Map<String,String> - Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (-) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
- version
Destroy StringTtl - Secret Version TTL after destruction request. This is a part of the delayed delete feature on Secret Version. For secret with versionDestroyTtl>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and the actual destruction happens after this TTL expires.
- annotations {[key: string]: string}
- Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
- create
Time string - The time at which the Secret was created.
- effective
Annotations {[key: string]: string} - effective
Labels {[key: string]: string} - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- expire
Time string - Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". Only one of 'expire_time' or 'ttl' can be provided.
- 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" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- name string
- The resource name of the Secret. Format:
projects/{{project}}/secrets/{{secret_id}}
- project string
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- 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.
- rotation
Secret
Rotation - The rotation time and period for a Secret. At 'next_rotation_time', Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. 'topics' must be set to configure rotation.
- secret
Id string - This must be unique within the project.
- topics
Secret
Topic[] - A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.
- ttl string
- The TTL for the Secret. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". Only one of 'ttl' or 'expire_time' can be provided.
- version
Aliases {[key: string]: string} - Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (-) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
- version
Destroy stringTtl - Secret Version TTL after destruction request. This is a part of the delayed delete feature on Secret Version. For secret with versionDestroyTtl>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and the actual destruction happens after this TTL expires.
- annotations Mapping[str, str]
- Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
- create_
time str - The time at which the Secret was created.
- effective_
annotations Mapping[str, str] - effective_
labels Mapping[str, str] - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- expire_
time str - Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". Only one of 'expire_time' or 'ttl' can be provided.
- 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}][\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" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- name str
- The resource name of the Secret. Format:
projects/{{project}}/secrets/{{secret_id}}
- project str
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- 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.
- rotation
Secret
Rotation Args - The rotation time and period for a Secret. At 'next_rotation_time', Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. 'topics' must be set to configure rotation.
- secret_
id str - This must be unique within the project.
- topics
Sequence[Secret
Topic Args] - A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.
- ttl str
- The TTL for the Secret. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". Only one of 'ttl' or 'expire_time' can be provided.
- version_
aliases Mapping[str, str] - Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (-) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
- version_
destroy_ strttl - Secret Version TTL after destruction request. This is a part of the delayed delete feature on Secret Version. For secret with versionDestroyTtl>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and the actual destruction happens after this TTL expires.
- annotations Map<String>
- Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. Note: This field is non-authoritative, and will only manage the annotations present in your configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
- create
Time String - The time at which the Secret was created.
- effective
Annotations Map<String> - effective
Labels Map<String> - All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
- expire
Time String - Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". Only one of 'expire_time' or 'ttl' can be provided.
- 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}][\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" }. Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field 'effective_labels' for all of the labels present on the resource.
- name String
- The resource name of the Secret. Format:
projects/{{project}}/secrets/{{secret_id}}
- project String
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- replication Property Map
- 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.
- rotation Property Map
- The rotation time and period for a Secret. At 'next_rotation_time', Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. 'topics' must be set to configure rotation.
- secret
Id String - This must be unique within the project.
- topics List<Property Map>
- A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.
- ttl String
- The TTL for the Secret. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". Only one of 'ttl' or 'expire_time' can be provided.
- version
Aliases Map<String> - Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (-) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
- version
Destroy StringTtl - Secret Version TTL after destruction request. This is a part of the delayed delete feature on Secret Version. For secret with versionDestroyTtl>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and the actual destruction happens after this TTL expires.
Supporting Types
SecretReplication, SecretReplicationArgs
- Auto
Secret
Replication Auto - The Secret will automatically be replicated without any restrictions. Structure is documented below.
- User
Managed SecretReplication User Managed - The Secret will be replicated to the regions specified by the user. Structure is documented below.
- Auto
Secret
Replication Auto - The Secret will automatically be replicated without any restrictions. Structure is documented below.
- User
Managed SecretReplication User Managed - The Secret will be replicated to the regions specified by the user. Structure is documented below.
- auto
Secret
Replication Auto - The Secret will automatically be replicated without any restrictions. Structure is documented below.
- user
Managed SecretReplication User Managed - The Secret will be replicated to the regions specified by the user. Structure is documented below.
- auto
Secret
Replication Auto - The Secret will automatically be replicated without any restrictions. Structure is documented below.
- user
Managed SecretReplication User Managed - The Secret will be replicated to the regions specified by the user. Structure is documented below.
- auto
Secret
Replication Auto - The Secret will automatically be replicated without any restrictions. Structure is documented below.
- user_
managed SecretReplication User Managed - The Secret will be replicated to the regions specified by the user. Structure is documented below.
- auto Property Map
- The Secret will automatically be replicated without any restrictions. Structure is documented below.
- user
Managed Property Map - The Secret will be replicated to the regions specified by the user. Structure is documented below.
SecretReplicationAuto, SecretReplicationAutoArgs
- Customer
Managed SecretEncryption Replication Auto Customer Managed Encryption - The customer-managed encryption configuration of the Secret. If no configuration is provided, Google-managed default encryption is used. Structure is documented below.
- Customer
Managed SecretEncryption Replication Auto Customer Managed Encryption - The customer-managed encryption configuration of the Secret. If no configuration is provided, Google-managed default encryption is used. Structure is documented below.
- customer
Managed SecretEncryption Replication Auto Customer Managed Encryption - The customer-managed encryption configuration of the Secret. If no configuration is provided, Google-managed default encryption is used. Structure is documented below.
- customer
Managed SecretEncryption Replication Auto Customer Managed Encryption - The customer-managed encryption configuration of the Secret. If no configuration is provided, Google-managed default encryption is used. Structure is documented below.
- customer_
managed_ Secretencryption Replication Auto Customer Managed Encryption - The customer-managed encryption configuration of the Secret. If no configuration is provided, Google-managed default encryption is used. Structure is documented below.
- customer
Managed Property MapEncryption - The customer-managed encryption configuration of the Secret. If no configuration is provided, Google-managed default encryption is used. Structure is documented below.
SecretReplicationAutoCustomerManagedEncryption, SecretReplicationAutoCustomerManagedEncryptionArgs
- Kms
Key stringName - Describes the Cloud KMS encryption key that will be used to protect destination secret.
- Kms
Key stringName - Describes the Cloud KMS encryption key that will be used to protect destination secret.
- kms
Key StringName - Describes the Cloud KMS encryption key that will be used to protect destination secret.
- kms
Key stringName - Describes the Cloud KMS encryption key that will be used to protect destination secret.
- kms_
key_ strname - Describes the Cloud KMS encryption key that will be used to protect destination secret.
- kms
Key StringName - Describes the Cloud KMS encryption key that will be used to protect destination secret.
SecretReplicationUserManaged, SecretReplicationUserManagedArgs
- Replicas
List<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.
- replicas
Secret
Replication User Managed Replica[] - The list of Replicas for this Secret. Cannot be empty. Structure is documented below.
- replicas
Sequence[Secret
Replication User Managed Replica] - The list of Replicas for this Secret. Cannot be empty. Structure is documented below.
- replicas List<Property Map>
- The list of Replicas for this Secret. Cannot be empty. Structure is documented below.
SecretReplicationUserManagedReplica, SecretReplicationUserManagedReplicaArgs
- Location string
- The canonical IDs of the location to replicate data. For example: "us-east1".
- Customer
Managed SecretEncryption Replication User Managed Replica Customer Managed Encryption - Customer Managed Encryption for the secret. Structure is documented below.
- Location string
- The canonical IDs of the location to replicate data. For example: "us-east1".
- Customer
Managed SecretEncryption Replication User Managed Replica Customer Managed Encryption - Customer Managed Encryption for the secret. Structure is documented below.
- location String
- The canonical IDs of the location to replicate data. For example: "us-east1".
- customer
Managed SecretEncryption Replication User Managed Replica Customer Managed Encryption - Customer Managed Encryption for the secret. Structure is documented below.
- location string
- The canonical IDs of the location to replicate data. For example: "us-east1".
- customer
Managed SecretEncryption Replication User Managed Replica Customer Managed Encryption - Customer Managed Encryption for the secret. Structure is documented below.
- location str
- The canonical IDs of the location to replicate data. For example: "us-east1".
- customer_
managed_ Secretencryption Replication User Managed Replica Customer Managed Encryption - Customer Managed Encryption for the secret. Structure is documented below.
- location String
- The canonical IDs of the location to replicate data. For example: "us-east1".
- customer
Managed Property MapEncryption - Customer Managed Encryption for the secret. Structure is documented below.
SecretReplicationUserManagedReplicaCustomerManagedEncryption, SecretReplicationUserManagedReplicaCustomerManagedEncryptionArgs
- Kms
Key stringName - Describes the Cloud KMS encryption key that will be used to protect destination secret.
- Kms
Key stringName - Describes the Cloud KMS encryption key that will be used to protect destination secret.
- kms
Key StringName - Describes the Cloud KMS encryption key that will be used to protect destination secret.
- kms
Key stringName - Describes the Cloud KMS encryption key that will be used to protect destination secret.
- kms_
key_ strname - Describes the Cloud KMS encryption key that will be used to protect destination secret.
- kms
Key StringName - Describes the Cloud KMS encryption key that will be used to protect destination secret.
SecretRotation, SecretRotationArgs
- Next
Rotation stringTime - Timestamp in UTC at which the Secret is scheduled to rotate. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- Rotation
Period string - The Duration between rotation notifications. Must be in seconds and at least 3600s (1h) and at most 3153600000s (100 years).
If rotationPeriod is set,
next_rotation_time
must be set.next_rotation_time
will be advanced by this period when the service automatically sends rotation notifications.
- Next
Rotation stringTime - Timestamp in UTC at which the Secret is scheduled to rotate. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- Rotation
Period string - The Duration between rotation notifications. Must be in seconds and at least 3600s (1h) and at most 3153600000s (100 years).
If rotationPeriod is set,
next_rotation_time
must be set.next_rotation_time
will be advanced by this period when the service automatically sends rotation notifications.
- next
Rotation StringTime - Timestamp in UTC at which the Secret is scheduled to rotate. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- rotation
Period String - The Duration between rotation notifications. Must be in seconds and at least 3600s (1h) and at most 3153600000s (100 years).
If rotationPeriod is set,
next_rotation_time
must be set.next_rotation_time
will be advanced by this period when the service automatically sends rotation notifications.
- next
Rotation stringTime - Timestamp in UTC at which the Secret is scheduled to rotate. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- rotation
Period string - The Duration between rotation notifications. Must be in seconds and at least 3600s (1h) and at most 3153600000s (100 years).
If rotationPeriod is set,
next_rotation_time
must be set.next_rotation_time
will be advanced by this period when the service automatically sends rotation notifications.
- next_
rotation_ strtime - Timestamp in UTC at which the Secret is scheduled to rotate. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- rotation_
period str - The Duration between rotation notifications. Must be in seconds and at least 3600s (1h) and at most 3153600000s (100 years).
If rotationPeriod is set,
next_rotation_time
must be set.next_rotation_time
will be advanced by this period when the service automatically sends rotation notifications.
- next
Rotation StringTime - Timestamp in UTC at which the Secret is scheduled to rotate. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
- rotation
Period String - The Duration between rotation notifications. Must be in seconds and at least 3600s (1h) and at most 3153600000s (100 years).
If rotationPeriod is set,
next_rotation_time
must be set.next_rotation_time
will be advanced by this period when the service automatically sends rotation notifications.
SecretTopic, SecretTopicArgs
- Name string
- The resource name of the Pub/Sub topic that will be published to, in the following format: projects//topics/. For publication to succeed, the Secret Manager Service Agent service account must have pubsub.publisher permissions on the topic.
- Name string
- The resource name of the Pub/Sub topic that will be published to, in the following format: projects//topics/. For publication to succeed, the Secret Manager Service Agent service account must have pubsub.publisher permissions on the topic.
- name String
- The resource name of the Pub/Sub topic that will be published to, in the following format: projects//topics/. For publication to succeed, the Secret Manager Service Agent service account must have pubsub.publisher permissions on the topic.
- name string
- The resource name of the Pub/Sub topic that will be published to, in the following format: projects//topics/. For publication to succeed, the Secret Manager Service Agent service account must have pubsub.publisher permissions on the topic.
- name str
- The resource name of the Pub/Sub topic that will be published to, in the following format: projects//topics/. For publication to succeed, the Secret Manager Service Agent service account must have pubsub.publisher permissions on the topic.
- name String
- The resource name of the Pub/Sub topic that will be published to, in the following format: projects//topics/. For publication to succeed, the Secret Manager Service Agent service account must have pubsub.publisher permissions on the topic.
Import
Secret can be imported using any of these accepted formats:
projects/{{project}}/secrets/{{secret_id}}
{{project}}/{{secret_id}}
{{secret_id}}
When using the pulumi import
command, Secret can be imported using one of the formats above. For example:
$ pulumi import gcp:secretmanager/secret:Secret default projects/{{project}}/secrets/{{secret_id}}
$ pulumi import gcp:secretmanager/secret:Secret default {{project}}/{{secret_id}}
$ pulumi import gcp:secretmanager/secret:Secret default {{secret_id}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.