gcp.secretmanager.RegionalSecret
Explore with Pulumi AI
A Regional Secret is a logical secret whose value and versions can be created and accessed within a region only.
To get more information about RegionalSecret, see:
Example Usage
Regional Secret Config Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const regional_secret_basic = new gcp.secretmanager.RegionalSecret("regional-secret-basic", {
secretId: "tf-reg-secret",
location: "us-central1",
labels: {
label: "my-label",
},
annotations: {
key1: "value1",
key2: "value2",
key3: "value3",
},
});
import pulumi
import pulumi_gcp as gcp
regional_secret_basic = gcp.secretmanager.RegionalSecret("regional-secret-basic",
secret_id="tf-reg-secret",
location="us-central1",
labels={
"label": "my-label",
},
annotations={
"key1": "value1",
"key2": "value2",
"key3": "value3",
})
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.NewRegionalSecret(ctx, "regional-secret-basic", &secretmanager.RegionalSecretArgs{
SecretId: pulumi.String("tf-reg-secret"),
Location: pulumi.String("us-central1"),
Labels: pulumi.StringMap{
"label": pulumi.String("my-label"),
},
Annotations: pulumi.StringMap{
"key1": pulumi.String("value1"),
"key2": pulumi.String("value2"),
"key3": pulumi.String("value3"),
},
})
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 regional_secret_basic = new Gcp.SecretManager.RegionalSecret("regional-secret-basic", new()
{
SecretId = "tf-reg-secret",
Location = "us-central1",
Labels =
{
{ "label", "my-label" },
},
Annotations =
{
{ "key1", "value1" },
{ "key2", "value2" },
{ "key3", "value3" },
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.secretmanager.RegionalSecret;
import com.pulumi.gcp.secretmanager.RegionalSecretArgs;
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 regional_secret_basic = new RegionalSecret("regional-secret-basic", RegionalSecretArgs.builder()
.secretId("tf-reg-secret")
.location("us-central1")
.labels(Map.of("label", "my-label"))
.annotations(Map.ofEntries(
Map.entry("key1", "value1"),
Map.entry("key2", "value2"),
Map.entry("key3", "value3")
))
.build());
}
}
resources:
regional-secret-basic:
type: gcp:secretmanager:RegionalSecret
properties:
secretId: tf-reg-secret
location: us-central1
labels:
label: my-label
annotations:
key1: value1
key2: value2
key3: value3
Regional Secret With 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 regional_secret_with_cmek = new gcp.secretmanager.RegionalSecret("regional-secret-with-cmek", {
secretId: "tf-reg-secret",
location: "us-central1",
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")
regional_secret_with_cmek = gcp.secretmanager.RegionalSecret("regional-secret-with-cmek",
secret_id="tf-reg-secret",
location="us-central1",
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, &organizations.LookupProjectArgs{}, 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.NewRegionalSecret(ctx, "regional-secret-with-cmek", &secretmanager.RegionalSecretArgs{
SecretId: pulumi.String("tf-reg-secret"),
Location: pulumi.String("us-central1"),
CustomerManagedEncryption: &secretmanager.RegionalSecretCustomerManagedEncryptionArgs{
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 regional_secret_with_cmek = new Gcp.SecretManager.RegionalSecret("regional-secret-with-cmek", new()
{
SecretId = "tf-reg-secret",
Location = "us-central1",
CustomerManagedEncryption = new Gcp.SecretManager.Inputs.RegionalSecretCustomerManagedEncryptionArgs
{
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.RegionalSecret;
import com.pulumi.gcp.secretmanager.RegionalSecretArgs;
import com.pulumi.gcp.secretmanager.inputs.RegionalSecretCustomerManagedEncryptionArgs;
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 regional_secret_with_cmek = new RegionalSecret("regional-secret-with-cmek", RegionalSecretArgs.builder()
.secretId("tf-reg-secret")
.location("us-central1")
.customerManagedEncryption(RegionalSecretCustomerManagedEncryptionArgs.builder()
.kmsKeyName("kms-key")
.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
regional-secret-with-cmek:
type: gcp:secretmanager:RegionalSecret
properties:
secretId: tf-reg-secret
location: us-central1
customerManagedEncryption:
kmsKeyName: kms-key
options:
dependson:
- ${["kms-secret-binding"]}
variables:
project:
fn::invoke:
Function: gcp:organizations:getProject
Arguments: {}
Regional Secret With Rotation
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const project = gcp.organizations.getProject({});
const topic = new gcp.pubsub.Topic("topic", {name: "tf-topic"});
const secretsManagerAccess = new gcp.pubsub.TopicIAMMember("secrets_manager_access", {
topic: topic.name,
role: "roles/pubsub.publisher",
member: project.then(project => `serviceAccount:service-${project.number}@gcp-sa-secretmanager.iam.gserviceaccount.com`),
});
const regional_secret_with_rotation = new gcp.secretmanager.RegionalSecret("regional-secret-with-rotation", {
secretId: "tf-reg-secret",
location: "us-central1",
topics: [{
name: topic.id,
}],
rotation: {
rotationPeriod: "3600s",
nextRotationTime: "2045-11-30T00:00:00Z",
},
}, {
dependsOn: [secretsManagerAccess],
});
import pulumi
import pulumi_gcp as gcp
project = gcp.organizations.get_project()
topic = gcp.pubsub.Topic("topic", name="tf-topic")
secrets_manager_access = gcp.pubsub.TopicIAMMember("secrets_manager_access",
topic=topic.name,
role="roles/pubsub.publisher",
member=f"serviceAccount:service-{project.number}@gcp-sa-secretmanager.iam.gserviceaccount.com")
regional_secret_with_rotation = gcp.secretmanager.RegionalSecret("regional-secret-with-rotation",
secret_id="tf-reg-secret",
location="us-central1",
topics=[{
"name": topic.id,
}],
rotation={
"rotation_period": "3600s",
"next_rotation_time": "2045-11-30T00:00:00Z",
},
opts = pulumi.ResourceOptions(depends_on=[secrets_manager_access]))
package main
import (
"fmt"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/pubsub"
"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, &organizations.LookupProjectArgs{}, nil)
if err != nil {
return err
}
topic, err := pubsub.NewTopic(ctx, "topic", &pubsub.TopicArgs{
Name: pulumi.String("tf-topic"),
})
if err != nil {
return err
}
secretsManagerAccess, err := pubsub.NewTopicIAMMember(ctx, "secrets_manager_access", &pubsub.TopicIAMMemberArgs{
Topic: topic.Name,
Role: pulumi.String("roles/pubsub.publisher"),
Member: pulumi.Sprintf("serviceAccount:service-%v@gcp-sa-secretmanager.iam.gserviceaccount.com", project.Number),
})
if err != nil {
return err
}
_, err = secretmanager.NewRegionalSecret(ctx, "regional-secret-with-rotation", &secretmanager.RegionalSecretArgs{
SecretId: pulumi.String("tf-reg-secret"),
Location: pulumi.String("us-central1"),
Topics: secretmanager.RegionalSecretTopicArray{
&secretmanager.RegionalSecretTopicArgs{
Name: topic.ID(),
},
},
Rotation: &secretmanager.RegionalSecretRotationArgs{
RotationPeriod: pulumi.String("3600s"),
NextRotationTime: pulumi.String("2045-11-30T00:00:00Z"),
},
}, pulumi.DependsOn([]pulumi.Resource{
secretsManagerAccess,
}))
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 topic = new Gcp.PubSub.Topic("topic", new()
{
Name = "tf-topic",
});
var secretsManagerAccess = new Gcp.PubSub.TopicIAMMember("secrets_manager_access", new()
{
Topic = topic.Name,
Role = "roles/pubsub.publisher",
Member = $"serviceAccount:service-{project.Apply(getProjectResult => getProjectResult.Number)}@gcp-sa-secretmanager.iam.gserviceaccount.com",
});
var regional_secret_with_rotation = new Gcp.SecretManager.RegionalSecret("regional-secret-with-rotation", new()
{
SecretId = "tf-reg-secret",
Location = "us-central1",
Topics = new[]
{
new Gcp.SecretManager.Inputs.RegionalSecretTopicArgs
{
Name = topic.Id,
},
},
Rotation = new Gcp.SecretManager.Inputs.RegionalSecretRotationArgs
{
RotationPeriod = "3600s",
NextRotationTime = "2045-11-30T00:00:00Z",
},
}, new CustomResourceOptions
{
DependsOn =
{
secretsManagerAccess,
},
});
});
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.pubsub.Topic;
import com.pulumi.gcp.pubsub.TopicArgs;
import com.pulumi.gcp.pubsub.TopicIAMMember;
import com.pulumi.gcp.pubsub.TopicIAMMemberArgs;
import com.pulumi.gcp.secretmanager.RegionalSecret;
import com.pulumi.gcp.secretmanager.RegionalSecretArgs;
import com.pulumi.gcp.secretmanager.inputs.RegionalSecretTopicArgs;
import com.pulumi.gcp.secretmanager.inputs.RegionalSecretRotationArgs;
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 topic = new Topic("topic", TopicArgs.builder()
.name("tf-topic")
.build());
var secretsManagerAccess = new TopicIAMMember("secretsManagerAccess", TopicIAMMemberArgs.builder()
.topic(topic.name())
.role("roles/pubsub.publisher")
.member(String.format("serviceAccount:service-%s@gcp-sa-secretmanager.iam.gserviceaccount.com", project.applyValue(getProjectResult -> getProjectResult.number())))
.build());
var regional_secret_with_rotation = new RegionalSecret("regional-secret-with-rotation", RegionalSecretArgs.builder()
.secretId("tf-reg-secret")
.location("us-central1")
.topics(RegionalSecretTopicArgs.builder()
.name(topic.id())
.build())
.rotation(RegionalSecretRotationArgs.builder()
.rotationPeriod("3600s")
.nextRotationTime("2045-11-30T00:00:00Z")
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(secretsManagerAccess)
.build());
}
}
resources:
topic:
type: gcp:pubsub:Topic
properties:
name: tf-topic
secretsManagerAccess:
type: gcp:pubsub:TopicIAMMember
name: secrets_manager_access
properties:
topic: ${topic.name}
role: roles/pubsub.publisher
member: serviceAccount:service-${project.number}@gcp-sa-secretmanager.iam.gserviceaccount.com
regional-secret-with-rotation:
type: gcp:secretmanager:RegionalSecret
properties:
secretId: tf-reg-secret
location: us-central1
topics:
- name: ${topic.id}
rotation:
rotationPeriod: 3600s
nextRotationTime: 2045-11-30T00:00:00Z
options:
dependson:
- ${secretsManagerAccess}
variables:
project:
fn::invoke:
Function: gcp:organizations:getProject
Arguments: {}
Regional Secret With Ttl
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const regional_secret_with_ttl = new gcp.secretmanager.RegionalSecret("regional-secret-with-ttl", {
secretId: "tf-reg-secret",
location: "us-central1",
labels: {
label: "my-label",
},
annotations: {
key1: "value1",
key2: "value2",
key3: "value3",
},
ttl: "36000s",
});
import pulumi
import pulumi_gcp as gcp
regional_secret_with_ttl = gcp.secretmanager.RegionalSecret("regional-secret-with-ttl",
secret_id="tf-reg-secret",
location="us-central1",
labels={
"label": "my-label",
},
annotations={
"key1": "value1",
"key2": "value2",
"key3": "value3",
},
ttl="36000s")
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.NewRegionalSecret(ctx, "regional-secret-with-ttl", &secretmanager.RegionalSecretArgs{
SecretId: pulumi.String("tf-reg-secret"),
Location: pulumi.String("us-central1"),
Labels: pulumi.StringMap{
"label": pulumi.String("my-label"),
},
Annotations: pulumi.StringMap{
"key1": pulumi.String("value1"),
"key2": pulumi.String("value2"),
"key3": pulumi.String("value3"),
},
Ttl: pulumi.String("36000s"),
})
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 regional_secret_with_ttl = new Gcp.SecretManager.RegionalSecret("regional-secret-with-ttl", new()
{
SecretId = "tf-reg-secret",
Location = "us-central1",
Labels =
{
{ "label", "my-label" },
},
Annotations =
{
{ "key1", "value1" },
{ "key2", "value2" },
{ "key3", "value3" },
},
Ttl = "36000s",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.secretmanager.RegionalSecret;
import com.pulumi.gcp.secretmanager.RegionalSecretArgs;
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 regional_secret_with_ttl = new RegionalSecret("regional-secret-with-ttl", RegionalSecretArgs.builder()
.secretId("tf-reg-secret")
.location("us-central1")
.labels(Map.of("label", "my-label"))
.annotations(Map.ofEntries(
Map.entry("key1", "value1"),
Map.entry("key2", "value2"),
Map.entry("key3", "value3")
))
.ttl("36000s")
.build());
}
}
resources:
regional-secret-with-ttl:
type: gcp:secretmanager:RegionalSecret
properties:
secretId: tf-reg-secret
location: us-central1
labels:
label: my-label
annotations:
key1: value1
key2: value2
key3: value3
ttl: 36000s
Regional Secret With Expire Time
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const regional_secret_with_expire_time = new gcp.secretmanager.RegionalSecret("regional-secret-with-expire-time", {
secretId: "tf-reg-secret",
location: "us-central1",
labels: {
label: "my-label",
},
annotations: {
key1: "value1",
key2: "value2",
key3: "value3",
},
expireTime: "2055-11-30T00:00:00Z",
});
import pulumi
import pulumi_gcp as gcp
regional_secret_with_expire_time = gcp.secretmanager.RegionalSecret("regional-secret-with-expire-time",
secret_id="tf-reg-secret",
location="us-central1",
labels={
"label": "my-label",
},
annotations={
"key1": "value1",
"key2": "value2",
"key3": "value3",
},
expire_time="2055-11-30T00:00:00Z")
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.NewRegionalSecret(ctx, "regional-secret-with-expire-time", &secretmanager.RegionalSecretArgs{
SecretId: pulumi.String("tf-reg-secret"),
Location: pulumi.String("us-central1"),
Labels: pulumi.StringMap{
"label": pulumi.String("my-label"),
},
Annotations: pulumi.StringMap{
"key1": pulumi.String("value1"),
"key2": pulumi.String("value2"),
"key3": pulumi.String("value3"),
},
ExpireTime: pulumi.String("2055-11-30T00:00:00Z"),
})
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 regional_secret_with_expire_time = new Gcp.SecretManager.RegionalSecret("regional-secret-with-expire-time", new()
{
SecretId = "tf-reg-secret",
Location = "us-central1",
Labels =
{
{ "label", "my-label" },
},
Annotations =
{
{ "key1", "value1" },
{ "key2", "value2" },
{ "key3", "value3" },
},
ExpireTime = "2055-11-30T00:00:00Z",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.secretmanager.RegionalSecret;
import com.pulumi.gcp.secretmanager.RegionalSecretArgs;
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 regional_secret_with_expire_time = new RegionalSecret("regional-secret-with-expire-time", RegionalSecretArgs.builder()
.secretId("tf-reg-secret")
.location("us-central1")
.labels(Map.of("label", "my-label"))
.annotations(Map.ofEntries(
Map.entry("key1", "value1"),
Map.entry("key2", "value2"),
Map.entry("key3", "value3")
))
.expireTime("2055-11-30T00:00:00Z")
.build());
}
}
resources:
regional-secret-with-expire-time:
type: gcp:secretmanager:RegionalSecret
properties:
secretId: tf-reg-secret
location: us-central1
labels:
label: my-label
annotations:
key1: value1
key2: value2
key3: value3
expireTime: 2055-11-30T00:00:00Z
Regional Secret With Version Destroy Ttl
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const regional_secret_with_version_destroy_ttl = new gcp.secretmanager.RegionalSecret("regional-secret-with-version-destroy-ttl", {
secretId: "tf-reg-secret",
location: "us-central1",
labels: {
label: "my-label",
},
annotations: {
key1: "value1",
key2: "value2",
key3: "value3",
},
versionDestroyTtl: "86400s",
});
import pulumi
import pulumi_gcp as gcp
regional_secret_with_version_destroy_ttl = gcp.secretmanager.RegionalSecret("regional-secret-with-version-destroy-ttl",
secret_id="tf-reg-secret",
location="us-central1",
labels={
"label": "my-label",
},
annotations={
"key1": "value1",
"key2": "value2",
"key3": "value3",
},
version_destroy_ttl="86400s")
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.NewRegionalSecret(ctx, "regional-secret-with-version-destroy-ttl", &secretmanager.RegionalSecretArgs{
SecretId: pulumi.String("tf-reg-secret"),
Location: pulumi.String("us-central1"),
Labels: pulumi.StringMap{
"label": pulumi.String("my-label"),
},
Annotations: pulumi.StringMap{
"key1": pulumi.String("value1"),
"key2": pulumi.String("value2"),
"key3": pulumi.String("value3"),
},
VersionDestroyTtl: pulumi.String("86400s"),
})
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 regional_secret_with_version_destroy_ttl = new Gcp.SecretManager.RegionalSecret("regional-secret-with-version-destroy-ttl", new()
{
SecretId = "tf-reg-secret",
Location = "us-central1",
Labels =
{
{ "label", "my-label" },
},
Annotations =
{
{ "key1", "value1" },
{ "key2", "value2" },
{ "key3", "value3" },
},
VersionDestroyTtl = "86400s",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.secretmanager.RegionalSecret;
import com.pulumi.gcp.secretmanager.RegionalSecretArgs;
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 regional_secret_with_version_destroy_ttl = new RegionalSecret("regional-secret-with-version-destroy-ttl", RegionalSecretArgs.builder()
.secretId("tf-reg-secret")
.location("us-central1")
.labels(Map.of("label", "my-label"))
.annotations(Map.ofEntries(
Map.entry("key1", "value1"),
Map.entry("key2", "value2"),
Map.entry("key3", "value3")
))
.versionDestroyTtl("86400s")
.build());
}
}
resources:
regional-secret-with-version-destroy-ttl:
type: gcp:secretmanager:RegionalSecret
properties:
secretId: tf-reg-secret
location: us-central1
labels:
label: my-label
annotations:
key1: value1
key2: value2
key3: value3
versionDestroyTtl: 86400s
Create RegionalSecret Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RegionalSecret(name: string, args: RegionalSecretArgs, opts?: CustomResourceOptions);
@overload
def RegionalSecret(resource_name: str,
args: RegionalSecretArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RegionalSecret(resource_name: str,
opts: Optional[ResourceOptions] = None,
location: Optional[str] = None,
secret_id: Optional[str] = None,
annotations: Optional[Mapping[str, str]] = None,
customer_managed_encryption: Optional[RegionalSecretCustomerManagedEncryptionArgs] = None,
expire_time: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
project: Optional[str] = None,
rotation: Optional[RegionalSecretRotationArgs] = None,
topics: Optional[Sequence[RegionalSecretTopicArgs]] = None,
ttl: Optional[str] = None,
version_aliases: Optional[Mapping[str, str]] = None,
version_destroy_ttl: Optional[str] = None)
func NewRegionalSecret(ctx *Context, name string, args RegionalSecretArgs, opts ...ResourceOption) (*RegionalSecret, error)
public RegionalSecret(string name, RegionalSecretArgs args, CustomResourceOptions? opts = null)
public RegionalSecret(String name, RegionalSecretArgs args)
public RegionalSecret(String name, RegionalSecretArgs args, CustomResourceOptions options)
type: gcp:secretmanager:RegionalSecret
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 RegionalSecretArgs
- 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 RegionalSecretArgs
- 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 RegionalSecretArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RegionalSecretArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RegionalSecretArgs
- 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 regionalSecretResource = new Gcp.SecretManager.RegionalSecret("regionalSecretResource", new()
{
Location = "string",
SecretId = "string",
Annotations =
{
{ "string", "string" },
},
CustomerManagedEncryption = new Gcp.SecretManager.Inputs.RegionalSecretCustomerManagedEncryptionArgs
{
KmsKeyName = "string",
},
ExpireTime = "string",
Labels =
{
{ "string", "string" },
},
Project = "string",
Rotation = new Gcp.SecretManager.Inputs.RegionalSecretRotationArgs
{
NextRotationTime = "string",
RotationPeriod = "string",
},
Topics = new[]
{
new Gcp.SecretManager.Inputs.RegionalSecretTopicArgs
{
Name = "string",
},
},
Ttl = "string",
VersionAliases =
{
{ "string", "string" },
},
VersionDestroyTtl = "string",
});
example, err := secretmanager.NewRegionalSecret(ctx, "regionalSecretResource", &secretmanager.RegionalSecretArgs{
Location: pulumi.String("string"),
SecretId: pulumi.String("string"),
Annotations: pulumi.StringMap{
"string": pulumi.String("string"),
},
CustomerManagedEncryption: &secretmanager.RegionalSecretCustomerManagedEncryptionArgs{
KmsKeyName: pulumi.String("string"),
},
ExpireTime: pulumi.String("string"),
Labels: pulumi.StringMap{
"string": pulumi.String("string"),
},
Project: pulumi.String("string"),
Rotation: &secretmanager.RegionalSecretRotationArgs{
NextRotationTime: pulumi.String("string"),
RotationPeriod: pulumi.String("string"),
},
Topics: secretmanager.RegionalSecretTopicArray{
&secretmanager.RegionalSecretTopicArgs{
Name: pulumi.String("string"),
},
},
Ttl: pulumi.String("string"),
VersionAliases: pulumi.StringMap{
"string": pulumi.String("string"),
},
VersionDestroyTtl: pulumi.String("string"),
})
var regionalSecretResource = new RegionalSecret("regionalSecretResource", RegionalSecretArgs.builder()
.location("string")
.secretId("string")
.annotations(Map.of("string", "string"))
.customerManagedEncryption(RegionalSecretCustomerManagedEncryptionArgs.builder()
.kmsKeyName("string")
.build())
.expireTime("string")
.labels(Map.of("string", "string"))
.project("string")
.rotation(RegionalSecretRotationArgs.builder()
.nextRotationTime("string")
.rotationPeriod("string")
.build())
.topics(RegionalSecretTopicArgs.builder()
.name("string")
.build())
.ttl("string")
.versionAliases(Map.of("string", "string"))
.versionDestroyTtl("string")
.build());
regional_secret_resource = gcp.secretmanager.RegionalSecret("regionalSecretResource",
location="string",
secret_id="string",
annotations={
"string": "string",
},
customer_managed_encryption={
"kms_key_name": "string",
},
expire_time="string",
labels={
"string": "string",
},
project="string",
rotation={
"next_rotation_time": "string",
"rotation_period": "string",
},
topics=[{
"name": "string",
}],
ttl="string",
version_aliases={
"string": "string",
},
version_destroy_ttl="string")
const regionalSecretResource = new gcp.secretmanager.RegionalSecret("regionalSecretResource", {
location: "string",
secretId: "string",
annotations: {
string: "string",
},
customerManagedEncryption: {
kmsKeyName: "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:RegionalSecret
properties:
annotations:
string: string
customerManagedEncryption:
kmsKeyName: string
expireTime: string
labels:
string: string
location: string
project: string
rotation:
nextRotationTime: string
rotationPeriod: string
secretId: string
topics:
- name: string
ttl: string
versionAliases:
string: string
versionDestroyTtl: string
RegionalSecret Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The RegionalSecret resource accepts the following input properties:
- Location string
- The location of the regional secret. eg us-central1
- Secret
Id string - This must be unique within the project.
- Annotations Dictionary<string, string>
Custom metadata about the regional 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.- Customer
Managed RegionalEncryption Secret Customer Managed Encryption - The customer-managed encryption configuration of the regional secret. Structure is documented below.
- Expire
Time string - Timestamp in UTC when the regional 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
orttl
can be provided. - Labels Dictionary<string, string>
The labels assigned to this regional 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
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Rotation
Regional
Secret Rotation - The rotation time and period for a regional 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. Structure is documented below. - Topics
List<Regional
Secret Topic> - A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the regional secret or its versions. Structure is documented below.
- Ttl string
- The TTL for the regional secret. A duration in seconds with up to nine fractional digits,
terminated by 's'. Example: "3.5s". Only one of
ttl
orexpire_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. It must be atleast 24h.
- Location string
- The location of the regional secret. eg us-central1
- Secret
Id string - This must be unique within the project.
- Annotations map[string]string
Custom metadata about the regional 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.- Customer
Managed RegionalEncryption Secret Customer Managed Encryption Args - The customer-managed encryption configuration of the regional secret. Structure is documented below.
- Expire
Time string - Timestamp in UTC when the regional 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
orttl
can be provided. - Labels map[string]string
The labels assigned to this regional 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
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Rotation
Regional
Secret Rotation Args - The rotation time and period for a regional 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. Structure is documented below. - Topics
[]Regional
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 regional secret or its versions. Structure is documented below.
- Ttl string
- The TTL for the regional secret. A duration in seconds with up to nine fractional digits,
terminated by 's'. Example: "3.5s". Only one of
ttl
orexpire_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. It must be atleast 24h.
- location String
- The location of the regional secret. eg us-central1
- secret
Id String - This must be unique within the project.
- annotations Map<String,String>
Custom metadata about the regional 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.- customer
Managed RegionalEncryption Secret Customer Managed Encryption - The customer-managed encryption configuration of the regional secret. Structure is documented below.
- expire
Time String - Timestamp in UTC when the regional 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
orttl
can be provided. - labels Map<String,String>
The labels assigned to this regional 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
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rotation
Regional
Secret Rotation - The rotation time and period for a regional 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. Structure is documented below. - topics
List<Regional
Secret Topic> - A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the regional secret or its versions. Structure is documented below.
- ttl String
- The TTL for the regional secret. A duration in seconds with up to nine fractional digits,
terminated by 's'. Example: "3.5s". Only one of
ttl
orexpire_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. It must be atleast 24h.
- location string
- The location of the regional secret. eg us-central1
- secret
Id string - This must be unique within the project.
- annotations {[key: string]: string}
Custom metadata about the regional 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.- customer
Managed RegionalEncryption Secret Customer Managed Encryption - The customer-managed encryption configuration of the regional secret. Structure is documented below.
- expire
Time string - Timestamp in UTC when the regional 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
orttl
can be provided. - labels {[key: string]: string}
The labels assigned to this regional 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
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rotation
Regional
Secret Rotation - The rotation time and period for a regional 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. Structure is documented below. - topics
Regional
Secret Topic[] - A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the regional secret or its versions. Structure is documented below.
- ttl string
- The TTL for the regional secret. A duration in seconds with up to nine fractional digits,
terminated by 's'. Example: "3.5s". Only one of
ttl
orexpire_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. It must be atleast 24h.
- location str
- The location of the regional secret. eg us-central1
- secret_
id str - This must be unique within the project.
- annotations Mapping[str, str]
Custom metadata about the regional 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.- customer_
managed_ Regionalencryption Secret Customer Managed Encryption Args - The customer-managed encryption configuration of the regional secret. Structure is documented below.
- expire_
time str - Timestamp in UTC when the regional 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
orttl
can be provided. - labels Mapping[str, str]
The labels assigned to this regional 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
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rotation
Regional
Secret Rotation Args - The rotation time and period for a regional 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. Structure is documented below. - topics
Sequence[Regional
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 regional secret or its versions. Structure is documented below.
- ttl str
- The TTL for the regional secret. A duration in seconds with up to nine fractional digits,
terminated by 's'. Example: "3.5s". Only one of
ttl
orexpire_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. It must be atleast 24h.
- location String
- The location of the regional secret. eg us-central1
- secret
Id String - This must be unique within the project.
- annotations Map<String>
Custom metadata about the regional 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.- customer
Managed Property MapEncryption - The customer-managed encryption configuration of the regional secret. Structure is documented below.
- expire
Time String - Timestamp in UTC when the regional 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
orttl
can be provided. - labels Map<String>
The labels assigned to this regional 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
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- rotation Property Map
- The rotation time and period for a regional 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. Structure is documented below. - 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 regional secret or its versions. Structure is documented below.
- ttl String
- The TTL for the regional secret. A duration in seconds with up to nine fractional digits,
terminated by 's'. Example: "3.5s". Only one of
ttl
orexpire_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. It must be atleast 24h.
Outputs
All input properties are implicitly available as output properties. Additionally, the RegionalSecret resource produces the following output properties:
- Create
Time string - The time at which the regional 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 regional secret. Format:
projects/{{project}}/locations/{{location}}/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 regional 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 regional secret. Format:
projects/{{project}}/locations/{{location}}/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 regional 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 regional secret. Format:
projects/{{project}}/locations/{{location}}/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 regional 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 regional secret. Format:
projects/{{project}}/locations/{{location}}/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 regional 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 regional secret. Format:
projects/{{project}}/locations/{{location}}/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 regional 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 regional secret. Format:
projects/{{project}}/locations/{{location}}/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 RegionalSecret Resource
Get an existing RegionalSecret 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?: RegionalSecretState, opts?: CustomResourceOptions): RegionalSecret
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
annotations: Optional[Mapping[str, str]] = None,
create_time: Optional[str] = None,
customer_managed_encryption: Optional[RegionalSecretCustomerManagedEncryptionArgs] = 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,
location: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
pulumi_labels: Optional[Mapping[str, str]] = None,
rotation: Optional[RegionalSecretRotationArgs] = None,
secret_id: Optional[str] = None,
topics: Optional[Sequence[RegionalSecretTopicArgs]] = None,
ttl: Optional[str] = None,
version_aliases: Optional[Mapping[str, str]] = None,
version_destroy_ttl: Optional[str] = None) -> RegionalSecret
func GetRegionalSecret(ctx *Context, name string, id IDInput, state *RegionalSecretState, opts ...ResourceOption) (*RegionalSecret, error)
public static RegionalSecret Get(string name, Input<string> id, RegionalSecretState? state, CustomResourceOptions? opts = null)
public static RegionalSecret get(String name, Output<String> id, RegionalSecretState 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 regional 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 regional secret was created.
- Customer
Managed RegionalEncryption Secret Customer Managed Encryption - The customer-managed encryption configuration of the regional secret. Structure is documented below.
- 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 regional 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
orttl
can be provided. - Labels Dictionary<string, string>
The labels assigned to this regional 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.- Location string
- The location of the regional secret. eg us-central1
- Name string
- The resource name of the regional secret. Format:
projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels Dictionary<string, string> - The combination of labels configured directly on the resource and default labels configured on the provider.
- Rotation
Regional
Secret Rotation - The rotation time and period for a regional 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. Structure is documented below. - Secret
Id string - This must be unique within the project.
- Topics
List<Regional
Secret Topic> - A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the regional secret or its versions. Structure is documented below.
- Ttl string
- The TTL for the regional secret. A duration in seconds with up to nine fractional digits,
terminated by 's'. Example: "3.5s". Only one of
ttl
orexpire_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. It must be atleast 24h.
- Annotations map[string]string
Custom metadata about the regional 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 regional secret was created.
- Customer
Managed RegionalEncryption Secret Customer Managed Encryption Args - The customer-managed encryption configuration of the regional secret. Structure is documented below.
- 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 regional 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
orttl
can be provided. - Labels map[string]string
The labels assigned to this regional 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.- Location string
- The location of the regional secret. eg us-central1
- Name string
- The resource name of the regional secret. Format:
projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Pulumi
Labels map[string]string - The combination of labels configured directly on the resource and default labels configured on the provider.
- Rotation
Regional
Secret Rotation Args - The rotation time and period for a regional 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. Structure is documented below. - Secret
Id string - This must be unique within the project.
- Topics
[]Regional
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 regional secret or its versions. Structure is documented below.
- Ttl string
- The TTL for the regional secret. A duration in seconds with up to nine fractional digits,
terminated by 's'. Example: "3.5s". Only one of
ttl
orexpire_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. It must be atleast 24h.
- annotations Map<String,String>
Custom metadata about the regional 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 regional secret was created.
- customer
Managed RegionalEncryption Secret Customer Managed Encryption - The customer-managed encryption configuration of the regional secret. Structure is documented below.
- 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 regional 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
orttl
can be provided. - labels Map<String,String>
The labels assigned to this regional 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.- location String
- The location of the regional secret. eg us-central1
- name String
- The resource name of the regional secret. Format:
projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String,String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- rotation
Regional
Secret Rotation - The rotation time and period for a regional 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. Structure is documented below. - secret
Id String - This must be unique within the project.
- topics
List<Regional
Secret Topic> - A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the regional secret or its versions. Structure is documented below.
- ttl String
- The TTL for the regional secret. A duration in seconds with up to nine fractional digits,
terminated by 's'. Example: "3.5s". Only one of
ttl
orexpire_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. It must be atleast 24h.
- annotations {[key: string]: string}
Custom metadata about the regional 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 regional secret was created.
- customer
Managed RegionalEncryption Secret Customer Managed Encryption - The customer-managed encryption configuration of the regional secret. Structure is documented below.
- 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 regional 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
orttl
can be provided. - labels {[key: string]: string}
The labels assigned to this regional 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.- location string
- The location of the regional secret. eg us-central1
- name string
- The resource name of the regional secret. Format:
projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels {[key: string]: string} - The combination of labels configured directly on the resource and default labels configured on the provider.
- rotation
Regional
Secret Rotation - The rotation time and period for a regional 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. Structure is documented below. - secret
Id string - This must be unique within the project.
- topics
Regional
Secret Topic[] - A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the regional secret or its versions. Structure is documented below.
- ttl string
- The TTL for the regional secret. A duration in seconds with up to nine fractional digits,
terminated by 's'. Example: "3.5s". Only one of
ttl
orexpire_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. It must be atleast 24h.
- annotations Mapping[str, str]
Custom metadata about the regional 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 regional secret was created.
- customer_
managed_ Regionalencryption Secret Customer Managed Encryption Args - The customer-managed encryption configuration of the regional secret. Structure is documented below.
- 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 regional 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
orttl
can be provided. - labels Mapping[str, str]
The labels assigned to this regional 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.- location str
- The location of the regional secret. eg us-central1
- name str
- The resource name of the regional secret. Format:
projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi_
labels Mapping[str, str] - The combination of labels configured directly on the resource and default labels configured on the provider.
- rotation
Regional
Secret Rotation Args - The rotation time and period for a regional 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. Structure is documented below. - secret_
id str - This must be unique within the project.
- topics
Sequence[Regional
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 regional secret or its versions. Structure is documented below.
- ttl str
- The TTL for the regional secret. A duration in seconds with up to nine fractional digits,
terminated by 's'. Example: "3.5s". Only one of
ttl
orexpire_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. It must be atleast 24h.
- annotations Map<String>
Custom metadata about the regional 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 regional secret was created.
- customer
Managed Property MapEncryption - The customer-managed encryption configuration of the regional secret. Structure is documented below.
- 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 regional 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
orttl
can be provided. - labels Map<String>
The labels assigned to this regional 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.- location String
- The location of the regional secret. eg us-central1
- name String
- The resource name of the regional secret. Format:
projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- pulumi
Labels Map<String> - The combination of labels configured directly on the resource and default labels configured on the provider.
- rotation Property Map
- The rotation time and period for a regional 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. Structure is documented below. - 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 regional secret or its versions. Structure is documented below.
- ttl String
- The TTL for the regional secret. A duration in seconds with up to nine fractional digits,
terminated by 's'. Example: "3.5s". Only one of
ttl
orexpire_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. It must be atleast 24h.
Supporting Types
RegionalSecretCustomerManagedEncryption, RegionalSecretCustomerManagedEncryptionArgs
- Kms
Key stringName - The resource name of the Cloud KMS CryptoKey used to encrypt secret payloads.
- Kms
Key stringName - The resource name of the Cloud KMS CryptoKey used to encrypt secret payloads.
- kms
Key StringName - The resource name of the Cloud KMS CryptoKey used to encrypt secret payloads.
- kms
Key stringName - The resource name of the Cloud KMS CryptoKey used to encrypt secret payloads.
- kms_
key_ strname - The resource name of the Cloud KMS CryptoKey used to encrypt secret payloads.
- kms
Key StringName - The resource name of the Cloud KMS CryptoKey used to encrypt secret payloads.
RegionalSecretRotation, RegionalSecretRotationArgs
- 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.
RegionalSecretTopic, RegionalSecretTopicArgs
- 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
RegionalSecret can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}
{{project}}/{{location}}/{{secret_id}}
{{location}}/{{secret_id}}
When using the pulumi import
command, RegionalSecret can be imported using one of the formats above. For example:
$ pulumi import gcp:secretmanager/regionalSecret:RegionalSecret default projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}
$ pulumi import gcp:secretmanager/regionalSecret:RegionalSecret default {{project}}/{{location}}/{{secret_id}}
$ pulumi import gcp:secretmanager/regionalSecret:RegionalSecret default {{location}}/{{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.