1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. secretmanager
  5. RegionalSecretVersion
Google Cloud v8.26.0 published on Thursday, Apr 10, 2025 by Pulumi

gcp.secretmanager.RegionalSecretVersion

Explore with Pulumi AI

Example Usage

Regional Secret Version Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const secret_basic = new gcp.secretmanager.RegionalSecret("secret-basic", {
    secretId: "secret-version",
    location: "us-central1",
});
const regionalSecretVersionBasic = new gcp.secretmanager.RegionalSecretVersion("regional_secret_version_basic", {
    secret: secret_basic.id,
    secretData: "secret-data",
});
Copy
import pulumi
import pulumi_gcp as gcp

secret_basic = gcp.secretmanager.RegionalSecret("secret-basic",
    secret_id="secret-version",
    location="us-central1")
regional_secret_version_basic = gcp.secretmanager.RegionalSecretVersion("regional_secret_version_basic",
    secret=secret_basic.id,
    secret_data="secret-data")
Copy
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 {
		secret_basic, err := secretmanager.NewRegionalSecret(ctx, "secret-basic", &secretmanager.RegionalSecretArgs{
			SecretId: pulumi.String("secret-version"),
			Location: pulumi.String("us-central1"),
		})
		if err != nil {
			return err
		}
		_, err = secretmanager.NewRegionalSecretVersion(ctx, "regional_secret_version_basic", &secretmanager.RegionalSecretVersionArgs{
			Secret:     secret_basic.ID(),
			SecretData: pulumi.String("secret-data"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var secret_basic = new Gcp.SecretManager.RegionalSecret("secret-basic", new()
    {
        SecretId = "secret-version",
        Location = "us-central1",
    });

    var regionalSecretVersionBasic = new Gcp.SecretManager.RegionalSecretVersion("regional_secret_version_basic", new()
    {
        Secret = secret_basic.Id,
        SecretData = "secret-data",
    });

});
Copy
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 com.pulumi.gcp.secretmanager.RegionalSecretVersion;
import com.pulumi.gcp.secretmanager.RegionalSecretVersionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var secret_basic = new RegionalSecret("secret-basic", RegionalSecretArgs.builder()
            .secretId("secret-version")
            .location("us-central1")
            .build());

        var regionalSecretVersionBasic = new RegionalSecretVersion("regionalSecretVersionBasic", RegionalSecretVersionArgs.builder()
            .secret(secret_basic.id())
            .secretData("secret-data")
            .build());

    }
}
Copy
resources:
  secret-basic:
    type: gcp:secretmanager:RegionalSecret
    properties:
      secretId: secret-version
      location: us-central1
  regionalSecretVersionBasic:
    type: gcp:secretmanager:RegionalSecretVersion
    name: regional_secret_version_basic
    properties:
      secret: ${["secret-basic"].id}
      secretData: secret-data
Copy

Regional Secret Version With Base64 Data

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import * as std from "@pulumi/std";

const secret_basic = new gcp.secretmanager.RegionalSecret("secret-basic", {
    secretId: "secret-version",
    location: "us-central1",
});
const regionalSecretVersionBase64 = new gcp.secretmanager.RegionalSecretVersion("regional_secret_version_base64", {
    secret: secret_basic.id,
    secretData: std.filebase64({
        input: "secret-data.pfx",
    }).then(invoke => invoke.result),
    isSecretDataBase64: true,
});
Copy
import pulumi
import pulumi_gcp as gcp
import pulumi_std as std

secret_basic = gcp.secretmanager.RegionalSecret("secret-basic",
    secret_id="secret-version",
    location="us-central1")
regional_secret_version_base64 = gcp.secretmanager.RegionalSecretVersion("regional_secret_version_base64",
    secret=secret_basic.id,
    secret_data=std.filebase64(input="secret-data.pfx").result,
    is_secret_data_base64=True)
Copy
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/secretmanager"
	"github.com/pulumi/pulumi-std/sdk/go/std"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		secret_basic, err := secretmanager.NewRegionalSecret(ctx, "secret-basic", &secretmanager.RegionalSecretArgs{
			SecretId: pulumi.String("secret-version"),
			Location: pulumi.String("us-central1"),
		})
		if err != nil {
			return err
		}
		invokeFilebase64, err := std.Filebase64(ctx, &std.Filebase64Args{
			Input: "secret-data.pfx",
		}, nil)
		if err != nil {
			return err
		}
		_, err = secretmanager.NewRegionalSecretVersion(ctx, "regional_secret_version_base64", &secretmanager.RegionalSecretVersionArgs{
			Secret:             secret_basic.ID(),
			SecretData:         pulumi.String(invokeFilebase64.Result),
			IsSecretDataBase64: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
using Std = Pulumi.Std;

return await Deployment.RunAsync(() => 
{
    var secret_basic = new Gcp.SecretManager.RegionalSecret("secret-basic", new()
    {
        SecretId = "secret-version",
        Location = "us-central1",
    });

    var regionalSecretVersionBase64 = new Gcp.SecretManager.RegionalSecretVersion("regional_secret_version_base64", new()
    {
        Secret = secret_basic.Id,
        SecretData = Std.Filebase64.Invoke(new()
        {
            Input = "secret-data.pfx",
        }).Apply(invoke => invoke.Result),
        IsSecretDataBase64 = true,
    });

});
Copy
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 com.pulumi.gcp.secretmanager.RegionalSecretVersion;
import com.pulumi.gcp.secretmanager.RegionalSecretVersionArgs;
import com.pulumi.std.StdFunctions;
import com.pulumi.std.inputs.Filebase64Args;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var secret_basic = new RegionalSecret("secret-basic", RegionalSecretArgs.builder()
            .secretId("secret-version")
            .location("us-central1")
            .build());

        var regionalSecretVersionBase64 = new RegionalSecretVersion("regionalSecretVersionBase64", RegionalSecretVersionArgs.builder()
            .secret(secret_basic.id())
            .secretData(StdFunctions.filebase64(Filebase64Args.builder()
                .input("secret-data.pfx")
                .build()).result())
            .isSecretDataBase64(true)
            .build());

    }
}
Copy
resources:
  secret-basic:
    type: gcp:secretmanager:RegionalSecret
    properties:
      secretId: secret-version
      location: us-central1
  regionalSecretVersionBase64:
    type: gcp:secretmanager:RegionalSecretVersion
    name: regional_secret_version_base64
    properties:
      secret: ${["secret-basic"].id}
      secretData:
        fn::invoke:
          function: std:filebase64
          arguments:
            input: secret-data.pfx
          return: result
      isSecretDataBase64: true
Copy

Regional Secret Version Disabled

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const secret_basic = new gcp.secretmanager.RegionalSecret("secret-basic", {
    secretId: "secret-version",
    location: "us-central1",
});
const regionalSecretVersionDisabled = new gcp.secretmanager.RegionalSecretVersion("regional_secret_version_disabled", {
    secret: secret_basic.id,
    secretData: "secret-data",
    enabled: false,
});
Copy
import pulumi
import pulumi_gcp as gcp

secret_basic = gcp.secretmanager.RegionalSecret("secret-basic",
    secret_id="secret-version",
    location="us-central1")
regional_secret_version_disabled = gcp.secretmanager.RegionalSecretVersion("regional_secret_version_disabled",
    secret=secret_basic.id,
    secret_data="secret-data",
    enabled=False)
Copy
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 {
		secret_basic, err := secretmanager.NewRegionalSecret(ctx, "secret-basic", &secretmanager.RegionalSecretArgs{
			SecretId: pulumi.String("secret-version"),
			Location: pulumi.String("us-central1"),
		})
		if err != nil {
			return err
		}
		_, err = secretmanager.NewRegionalSecretVersion(ctx, "regional_secret_version_disabled", &secretmanager.RegionalSecretVersionArgs{
			Secret:     secret_basic.ID(),
			SecretData: pulumi.String("secret-data"),
			Enabled:    pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var secret_basic = new Gcp.SecretManager.RegionalSecret("secret-basic", new()
    {
        SecretId = "secret-version",
        Location = "us-central1",
    });

    var regionalSecretVersionDisabled = new Gcp.SecretManager.RegionalSecretVersion("regional_secret_version_disabled", new()
    {
        Secret = secret_basic.Id,
        SecretData = "secret-data",
        Enabled = false,
    });

});
Copy
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 com.pulumi.gcp.secretmanager.RegionalSecretVersion;
import com.pulumi.gcp.secretmanager.RegionalSecretVersionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var secret_basic = new RegionalSecret("secret-basic", RegionalSecretArgs.builder()
            .secretId("secret-version")
            .location("us-central1")
            .build());

        var regionalSecretVersionDisabled = new RegionalSecretVersion("regionalSecretVersionDisabled", RegionalSecretVersionArgs.builder()
            .secret(secret_basic.id())
            .secretData("secret-data")
            .enabled(false)
            .build());

    }
}
Copy
resources:
  secret-basic:
    type: gcp:secretmanager:RegionalSecret
    properties:
      secretId: secret-version
      location: us-central1
  regionalSecretVersionDisabled:
    type: gcp:secretmanager:RegionalSecretVersion
    name: regional_secret_version_disabled
    properties:
      secret: ${["secret-basic"].id}
      secretData: secret-data
      enabled: false
Copy

Regional Secret Version Deletion Policy Abandon

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const secret_basic = new gcp.secretmanager.RegionalSecret("secret-basic", {
    secretId: "secret-version",
    location: "us-central1",
});
const regionalSecretVersionDeletionPolicy = new gcp.secretmanager.RegionalSecretVersion("regional_secret_version_deletion_policy", {
    secret: secret_basic.id,
    secretData: "secret-data",
    deletionPolicy: "ABANDON",
});
Copy
import pulumi
import pulumi_gcp as gcp

secret_basic = gcp.secretmanager.RegionalSecret("secret-basic",
    secret_id="secret-version",
    location="us-central1")
regional_secret_version_deletion_policy = gcp.secretmanager.RegionalSecretVersion("regional_secret_version_deletion_policy",
    secret=secret_basic.id,
    secret_data="secret-data",
    deletion_policy="ABANDON")
Copy
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 {
		secret_basic, err := secretmanager.NewRegionalSecret(ctx, "secret-basic", &secretmanager.RegionalSecretArgs{
			SecretId: pulumi.String("secret-version"),
			Location: pulumi.String("us-central1"),
		})
		if err != nil {
			return err
		}
		_, err = secretmanager.NewRegionalSecretVersion(ctx, "regional_secret_version_deletion_policy", &secretmanager.RegionalSecretVersionArgs{
			Secret:         secret_basic.ID(),
			SecretData:     pulumi.String("secret-data"),
			DeletionPolicy: pulumi.String("ABANDON"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var secret_basic = new Gcp.SecretManager.RegionalSecret("secret-basic", new()
    {
        SecretId = "secret-version",
        Location = "us-central1",
    });

    var regionalSecretVersionDeletionPolicy = new Gcp.SecretManager.RegionalSecretVersion("regional_secret_version_deletion_policy", new()
    {
        Secret = secret_basic.Id,
        SecretData = "secret-data",
        DeletionPolicy = "ABANDON",
    });

});
Copy
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 com.pulumi.gcp.secretmanager.RegionalSecretVersion;
import com.pulumi.gcp.secretmanager.RegionalSecretVersionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var secret_basic = new RegionalSecret("secret-basic", RegionalSecretArgs.builder()
            .secretId("secret-version")
            .location("us-central1")
            .build());

        var regionalSecretVersionDeletionPolicy = new RegionalSecretVersion("regionalSecretVersionDeletionPolicy", RegionalSecretVersionArgs.builder()
            .secret(secret_basic.id())
            .secretData("secret-data")
            .deletionPolicy("ABANDON")
            .build());

    }
}
Copy
resources:
  secret-basic:
    type: gcp:secretmanager:RegionalSecret
    properties:
      secretId: secret-version
      location: us-central1
  regionalSecretVersionDeletionPolicy:
    type: gcp:secretmanager:RegionalSecretVersion
    name: regional_secret_version_deletion_policy
    properties:
      secret: ${["secret-basic"].id}
      secretData: secret-data
      deletionPolicy: ABANDON
Copy

Regional Secret Version Deletion Policy Disable

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const secret_basic = new gcp.secretmanager.RegionalSecret("secret-basic", {
    secretId: "secret-version",
    location: "us-central1",
});
const regionalSecretVersionDeletionPolicy = new gcp.secretmanager.RegionalSecretVersion("regional_secret_version_deletion_policy", {
    secret: secret_basic.id,
    secretData: "secret-data",
    deletionPolicy: "DISABLE",
});
Copy
import pulumi
import pulumi_gcp as gcp

secret_basic = gcp.secretmanager.RegionalSecret("secret-basic",
    secret_id="secret-version",
    location="us-central1")
regional_secret_version_deletion_policy = gcp.secretmanager.RegionalSecretVersion("regional_secret_version_deletion_policy",
    secret=secret_basic.id,
    secret_data="secret-data",
    deletion_policy="DISABLE")
Copy
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 {
		secret_basic, err := secretmanager.NewRegionalSecret(ctx, "secret-basic", &secretmanager.RegionalSecretArgs{
			SecretId: pulumi.String("secret-version"),
			Location: pulumi.String("us-central1"),
		})
		if err != nil {
			return err
		}
		_, err = secretmanager.NewRegionalSecretVersion(ctx, "regional_secret_version_deletion_policy", &secretmanager.RegionalSecretVersionArgs{
			Secret:         secret_basic.ID(),
			SecretData:     pulumi.String("secret-data"),
			DeletionPolicy: pulumi.String("DISABLE"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var secret_basic = new Gcp.SecretManager.RegionalSecret("secret-basic", new()
    {
        SecretId = "secret-version",
        Location = "us-central1",
    });

    var regionalSecretVersionDeletionPolicy = new Gcp.SecretManager.RegionalSecretVersion("regional_secret_version_deletion_policy", new()
    {
        Secret = secret_basic.Id,
        SecretData = "secret-data",
        DeletionPolicy = "DISABLE",
    });

});
Copy
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 com.pulumi.gcp.secretmanager.RegionalSecretVersion;
import com.pulumi.gcp.secretmanager.RegionalSecretVersionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var secret_basic = new RegionalSecret("secret-basic", RegionalSecretArgs.builder()
            .secretId("secret-version")
            .location("us-central1")
            .build());

        var regionalSecretVersionDeletionPolicy = new RegionalSecretVersion("regionalSecretVersionDeletionPolicy", RegionalSecretVersionArgs.builder()
            .secret(secret_basic.id())
            .secretData("secret-data")
            .deletionPolicy("DISABLE")
            .build());

    }
}
Copy
resources:
  secret-basic:
    type: gcp:secretmanager:RegionalSecret
    properties:
      secretId: secret-version
      location: us-central1
  regionalSecretVersionDeletionPolicy:
    type: gcp:secretmanager:RegionalSecretVersion
    name: regional_secret_version_deletion_policy
    properties:
      secret: ${["secret-basic"].id}
      secretData: secret-data
      deletionPolicy: DISABLE
Copy

Create RegionalSecretVersion Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new RegionalSecretVersion(name: string, args: RegionalSecretVersionArgs, opts?: CustomResourceOptions);
@overload
def RegionalSecretVersion(resource_name: str,
                          args: RegionalSecretVersionArgs,
                          opts: Optional[ResourceOptions] = None)

@overload
def RegionalSecretVersion(resource_name: str,
                          opts: Optional[ResourceOptions] = None,
                          secret: Optional[str] = None,
                          secret_data: Optional[str] = None,
                          deletion_policy: Optional[str] = None,
                          enabled: Optional[bool] = None,
                          is_secret_data_base64: Optional[bool] = None)
func NewRegionalSecretVersion(ctx *Context, name string, args RegionalSecretVersionArgs, opts ...ResourceOption) (*RegionalSecretVersion, error)
public RegionalSecretVersion(string name, RegionalSecretVersionArgs args, CustomResourceOptions? opts = null)
public RegionalSecretVersion(String name, RegionalSecretVersionArgs args)
public RegionalSecretVersion(String name, RegionalSecretVersionArgs args, CustomResourceOptions options)
type: gcp:secretmanager:RegionalSecretVersion
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. RegionalSecretVersionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. RegionalSecretVersionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. RegionalSecretVersionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. RegionalSecretVersionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. RegionalSecretVersionArgs
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 regionalSecretVersionResource = new Gcp.SecretManager.RegionalSecretVersion("regionalSecretVersionResource", new()
{
    Secret = "string",
    SecretData = "string",
    DeletionPolicy = "string",
    Enabled = false,
    IsSecretDataBase64 = false,
});
Copy
example, err := secretmanager.NewRegionalSecretVersion(ctx, "regionalSecretVersionResource", &secretmanager.RegionalSecretVersionArgs{
	Secret:             pulumi.String("string"),
	SecretData:         pulumi.String("string"),
	DeletionPolicy:     pulumi.String("string"),
	Enabled:            pulumi.Bool(false),
	IsSecretDataBase64: pulumi.Bool(false),
})
Copy
var regionalSecretVersionResource = new RegionalSecretVersion("regionalSecretVersionResource", RegionalSecretVersionArgs.builder()
    .secret("string")
    .secretData("string")
    .deletionPolicy("string")
    .enabled(false)
    .isSecretDataBase64(false)
    .build());
Copy
regional_secret_version_resource = gcp.secretmanager.RegionalSecretVersion("regionalSecretVersionResource",
    secret="string",
    secret_data="string",
    deletion_policy="string",
    enabled=False,
    is_secret_data_base64=False)
Copy
const regionalSecretVersionResource = new gcp.secretmanager.RegionalSecretVersion("regionalSecretVersionResource", {
    secret: "string",
    secretData: "string",
    deletionPolicy: "string",
    enabled: false,
    isSecretDataBase64: false,
});
Copy
type: gcp:secretmanager:RegionalSecretVersion
properties:
    deletionPolicy: string
    enabled: false
    isSecretDataBase64: false
    secret: string
    secretData: string
Copy

RegionalSecretVersion 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 RegionalSecretVersion resource accepts the following input properties:

Secret
This property is required.
Changes to this property will trigger replacement.
string
Secret Manager regional secret resource.


SecretData
This property is required.
Changes to this property will trigger replacement.
string
The secret data. Must be no larger than 64KiB. Note: This property is sensitive and will not be displayed in the plan.
DeletionPolicy string
The deletion policy for the regional secret version. Setting ABANDON allows the resource to be abandoned rather than deleted. Setting DISABLE allows the resource to be disabled rather than deleted. Default is DELETE. Possible values are:

  • DELETE
  • DISABLE
  • ABANDON
Enabled bool
The current state of the regional secret version.
IsSecretDataBase64 Changes to this property will trigger replacement. bool
If set to 'true', the secret data is expected to be base64-encoded string and would be sent as is.
Secret
This property is required.
Changes to this property will trigger replacement.
string
Secret Manager regional secret resource.


SecretData
This property is required.
Changes to this property will trigger replacement.
string
The secret data. Must be no larger than 64KiB. Note: This property is sensitive and will not be displayed in the plan.
DeletionPolicy string
The deletion policy for the regional secret version. Setting ABANDON allows the resource to be abandoned rather than deleted. Setting DISABLE allows the resource to be disabled rather than deleted. Default is DELETE. Possible values are:

  • DELETE
  • DISABLE
  • ABANDON
Enabled bool
The current state of the regional secret version.
IsSecretDataBase64 Changes to this property will trigger replacement. bool
If set to 'true', the secret data is expected to be base64-encoded string and would be sent as is.
secret
This property is required.
Changes to this property will trigger replacement.
String
Secret Manager regional secret resource.


secretData
This property is required.
Changes to this property will trigger replacement.
String
The secret data. Must be no larger than 64KiB. Note: This property is sensitive and will not be displayed in the plan.
deletionPolicy String
The deletion policy for the regional secret version. Setting ABANDON allows the resource to be abandoned rather than deleted. Setting DISABLE allows the resource to be disabled rather than deleted. Default is DELETE. Possible values are:

  • DELETE
  • DISABLE
  • ABANDON
enabled Boolean
The current state of the regional secret version.
isSecretDataBase64 Changes to this property will trigger replacement. Boolean
If set to 'true', the secret data is expected to be base64-encoded string and would be sent as is.
secret
This property is required.
Changes to this property will trigger replacement.
string
Secret Manager regional secret resource.


secretData
This property is required.
Changes to this property will trigger replacement.
string
The secret data. Must be no larger than 64KiB. Note: This property is sensitive and will not be displayed in the plan.
deletionPolicy string
The deletion policy for the regional secret version. Setting ABANDON allows the resource to be abandoned rather than deleted. Setting DISABLE allows the resource to be disabled rather than deleted. Default is DELETE. Possible values are:

  • DELETE
  • DISABLE
  • ABANDON
enabled boolean
The current state of the regional secret version.
isSecretDataBase64 Changes to this property will trigger replacement. boolean
If set to 'true', the secret data is expected to be base64-encoded string and would be sent as is.
secret
This property is required.
Changes to this property will trigger replacement.
str
Secret Manager regional secret resource.


secret_data
This property is required.
Changes to this property will trigger replacement.
str
The secret data. Must be no larger than 64KiB. Note: This property is sensitive and will not be displayed in the plan.
deletion_policy str
The deletion policy for the regional secret version. Setting ABANDON allows the resource to be abandoned rather than deleted. Setting DISABLE allows the resource to be disabled rather than deleted. Default is DELETE. Possible values are:

  • DELETE
  • DISABLE
  • ABANDON
enabled bool
The current state of the regional secret version.
is_secret_data_base64 Changes to this property will trigger replacement. bool
If set to 'true', the secret data is expected to be base64-encoded string and would be sent as is.
secret
This property is required.
Changes to this property will trigger replacement.
String
Secret Manager regional secret resource.


secretData
This property is required.
Changes to this property will trigger replacement.
String
The secret data. Must be no larger than 64KiB. Note: This property is sensitive and will not be displayed in the plan.
deletionPolicy String
The deletion policy for the regional secret version. Setting ABANDON allows the resource to be abandoned rather than deleted. Setting DISABLE allows the resource to be disabled rather than deleted. Default is DELETE. Possible values are:

  • DELETE
  • DISABLE
  • ABANDON
enabled Boolean
The current state of the regional secret version.
isSecretDataBase64 Changes to this property will trigger replacement. Boolean
If set to 'true', the secret data is expected to be base64-encoded string and would be sent as is.

Outputs

All input properties are implicitly available as output properties. Additionally, the RegionalSecretVersion resource produces the following output properties:

CreateTime string
The time at which the regional secret version was created.
CustomerManagedEncryptions List<RegionalSecretVersionCustomerManagedEncryption>
The customer-managed encryption configuration of the regional secret. Structure is documented below.
DestroyTime string
The time at which the regional secret version was destroyed. Only present if state is DESTROYED.
Id string
The provider-assigned unique ID for this managed resource.
Location string
Location of Secret Manager regional secret resource.
Name string
The resource name of the regional secret version. Format: projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}/versions/{{version}}
Version string
The version of the Regional Secret.
CreateTime string
The time at which the regional secret version was created.
CustomerManagedEncryptions []RegionalSecretVersionCustomerManagedEncryption
The customer-managed encryption configuration of the regional secret. Structure is documented below.
DestroyTime string
The time at which the regional secret version was destroyed. Only present if state is DESTROYED.
Id string
The provider-assigned unique ID for this managed resource.
Location string
Location of Secret Manager regional secret resource.
Name string
The resource name of the regional secret version. Format: projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}/versions/{{version}}
Version string
The version of the Regional Secret.
createTime String
The time at which the regional secret version was created.
customerManagedEncryptions List<RegionalSecretVersionCustomerManagedEncryption>
The customer-managed encryption configuration of the regional secret. Structure is documented below.
destroyTime String
The time at which the regional secret version was destroyed. Only present if state is DESTROYED.
id String
The provider-assigned unique ID for this managed resource.
location String
Location of Secret Manager regional secret resource.
name String
The resource name of the regional secret version. Format: projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}/versions/{{version}}
version String
The version of the Regional Secret.
createTime string
The time at which the regional secret version was created.
customerManagedEncryptions RegionalSecretVersionCustomerManagedEncryption[]
The customer-managed encryption configuration of the regional secret. Structure is documented below.
destroyTime string
The time at which the regional secret version was destroyed. Only present if state is DESTROYED.
id string
The provider-assigned unique ID for this managed resource.
location string
Location of Secret Manager regional secret resource.
name string
The resource name of the regional secret version. Format: projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}/versions/{{version}}
version string
The version of the Regional Secret.
create_time str
The time at which the regional secret version was created.
customer_managed_encryptions Sequence[RegionalSecretVersionCustomerManagedEncryption]
The customer-managed encryption configuration of the regional secret. Structure is documented below.
destroy_time str
The time at which the regional secret version was destroyed. Only present if state is DESTROYED.
id str
The provider-assigned unique ID for this managed resource.
location str
Location of Secret Manager regional secret resource.
name str
The resource name of the regional secret version. Format: projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}/versions/{{version}}
version str
The version of the Regional Secret.
createTime String
The time at which the regional secret version was created.
customerManagedEncryptions List<Property Map>
The customer-managed encryption configuration of the regional secret. Structure is documented below.
destroyTime String
The time at which the regional secret version was destroyed. Only present if state is DESTROYED.
id String
The provider-assigned unique ID for this managed resource.
location String
Location of Secret Manager regional secret resource.
name String
The resource name of the regional secret version. Format: projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}/versions/{{version}}
version String
The version of the Regional Secret.

Look up Existing RegionalSecretVersion Resource

Get an existing RegionalSecretVersion 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?: RegionalSecretVersionState, opts?: CustomResourceOptions): RegionalSecretVersion
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        create_time: Optional[str] = None,
        customer_managed_encryptions: Optional[Sequence[RegionalSecretVersionCustomerManagedEncryptionArgs]] = None,
        deletion_policy: Optional[str] = None,
        destroy_time: Optional[str] = None,
        enabled: Optional[bool] = None,
        is_secret_data_base64: Optional[bool] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        secret: Optional[str] = None,
        secret_data: Optional[str] = None,
        version: Optional[str] = None) -> RegionalSecretVersion
func GetRegionalSecretVersion(ctx *Context, name string, id IDInput, state *RegionalSecretVersionState, opts ...ResourceOption) (*RegionalSecretVersion, error)
public static RegionalSecretVersion Get(string name, Input<string> id, RegionalSecretVersionState? state, CustomResourceOptions? opts = null)
public static RegionalSecretVersion get(String name, Output<String> id, RegionalSecretVersionState state, CustomResourceOptions options)
resources:  _:    type: gcp:secretmanager:RegionalSecretVersion    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
CreateTime string
The time at which the regional secret version was created.
CustomerManagedEncryptions List<RegionalSecretVersionCustomerManagedEncryption>
The customer-managed encryption configuration of the regional secret. Structure is documented below.
DeletionPolicy string
The deletion policy for the regional secret version. Setting ABANDON allows the resource to be abandoned rather than deleted. Setting DISABLE allows the resource to be disabled rather than deleted. Default is DELETE. Possible values are:

  • DELETE
  • DISABLE
  • ABANDON
DestroyTime string
The time at which the regional secret version was destroyed. Only present if state is DESTROYED.
Enabled bool
The current state of the regional secret version.
IsSecretDataBase64 Changes to this property will trigger replacement. bool
If set to 'true', the secret data is expected to be base64-encoded string and would be sent as is.
Location string
Location of Secret Manager regional secret resource.
Name string
The resource name of the regional secret version. Format: projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}/versions/{{version}}
Secret Changes to this property will trigger replacement. string
Secret Manager regional secret resource.


SecretData Changes to this property will trigger replacement. string
The secret data. Must be no larger than 64KiB. Note: This property is sensitive and will not be displayed in the plan.
Version string
The version of the Regional Secret.
CreateTime string
The time at which the regional secret version was created.
CustomerManagedEncryptions []RegionalSecretVersionCustomerManagedEncryptionArgs
The customer-managed encryption configuration of the regional secret. Structure is documented below.
DeletionPolicy string
The deletion policy for the regional secret version. Setting ABANDON allows the resource to be abandoned rather than deleted. Setting DISABLE allows the resource to be disabled rather than deleted. Default is DELETE. Possible values are:

  • DELETE
  • DISABLE
  • ABANDON
DestroyTime string
The time at which the regional secret version was destroyed. Only present if state is DESTROYED.
Enabled bool
The current state of the regional secret version.
IsSecretDataBase64 Changes to this property will trigger replacement. bool
If set to 'true', the secret data is expected to be base64-encoded string and would be sent as is.
Location string
Location of Secret Manager regional secret resource.
Name string
The resource name of the regional secret version. Format: projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}/versions/{{version}}
Secret Changes to this property will trigger replacement. string
Secret Manager regional secret resource.


SecretData Changes to this property will trigger replacement. string
The secret data. Must be no larger than 64KiB. Note: This property is sensitive and will not be displayed in the plan.
Version string
The version of the Regional Secret.
createTime String
The time at which the regional secret version was created.
customerManagedEncryptions List<RegionalSecretVersionCustomerManagedEncryption>
The customer-managed encryption configuration of the regional secret. Structure is documented below.
deletionPolicy String
The deletion policy for the regional secret version. Setting ABANDON allows the resource to be abandoned rather than deleted. Setting DISABLE allows the resource to be disabled rather than deleted. Default is DELETE. Possible values are:

  • DELETE
  • DISABLE
  • ABANDON
destroyTime String
The time at which the regional secret version was destroyed. Only present if state is DESTROYED.
enabled Boolean
The current state of the regional secret version.
isSecretDataBase64 Changes to this property will trigger replacement. Boolean
If set to 'true', the secret data is expected to be base64-encoded string and would be sent as is.
location String
Location of Secret Manager regional secret resource.
name String
The resource name of the regional secret version. Format: projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}/versions/{{version}}
secret Changes to this property will trigger replacement. String
Secret Manager regional secret resource.


secretData Changes to this property will trigger replacement. String
The secret data. Must be no larger than 64KiB. Note: This property is sensitive and will not be displayed in the plan.
version String
The version of the Regional Secret.
createTime string
The time at which the regional secret version was created.
customerManagedEncryptions RegionalSecretVersionCustomerManagedEncryption[]
The customer-managed encryption configuration of the regional secret. Structure is documented below.
deletionPolicy string
The deletion policy for the regional secret version. Setting ABANDON allows the resource to be abandoned rather than deleted. Setting DISABLE allows the resource to be disabled rather than deleted. Default is DELETE. Possible values are:

  • DELETE
  • DISABLE
  • ABANDON
destroyTime string
The time at which the regional secret version was destroyed. Only present if state is DESTROYED.
enabled boolean
The current state of the regional secret version.
isSecretDataBase64 Changes to this property will trigger replacement. boolean
If set to 'true', the secret data is expected to be base64-encoded string and would be sent as is.
location string
Location of Secret Manager regional secret resource.
name string
The resource name of the regional secret version. Format: projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}/versions/{{version}}
secret Changes to this property will trigger replacement. string
Secret Manager regional secret resource.


secretData Changes to this property will trigger replacement. string
The secret data. Must be no larger than 64KiB. Note: This property is sensitive and will not be displayed in the plan.
version string
The version of the Regional Secret.
create_time str
The time at which the regional secret version was created.
customer_managed_encryptions Sequence[RegionalSecretVersionCustomerManagedEncryptionArgs]
The customer-managed encryption configuration of the regional secret. Structure is documented below.
deletion_policy str
The deletion policy for the regional secret version. Setting ABANDON allows the resource to be abandoned rather than deleted. Setting DISABLE allows the resource to be disabled rather than deleted. Default is DELETE. Possible values are:

  • DELETE
  • DISABLE
  • ABANDON
destroy_time str
The time at which the regional secret version was destroyed. Only present if state is DESTROYED.
enabled bool
The current state of the regional secret version.
is_secret_data_base64 Changes to this property will trigger replacement. bool
If set to 'true', the secret data is expected to be base64-encoded string and would be sent as is.
location str
Location of Secret Manager regional secret resource.
name str
The resource name of the regional secret version. Format: projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}/versions/{{version}}
secret Changes to this property will trigger replacement. str
Secret Manager regional secret resource.


secret_data Changes to this property will trigger replacement. str
The secret data. Must be no larger than 64KiB. Note: This property is sensitive and will not be displayed in the plan.
version str
The version of the Regional Secret.
createTime String
The time at which the regional secret version was created.
customerManagedEncryptions List<Property Map>
The customer-managed encryption configuration of the regional secret. Structure is documented below.
deletionPolicy String
The deletion policy for the regional secret version. Setting ABANDON allows the resource to be abandoned rather than deleted. Setting DISABLE allows the resource to be disabled rather than deleted. Default is DELETE. Possible values are:

  • DELETE
  • DISABLE
  • ABANDON
destroyTime String
The time at which the regional secret version was destroyed. Only present if state is DESTROYED.
enabled Boolean
The current state of the regional secret version.
isSecretDataBase64 Changes to this property will trigger replacement. Boolean
If set to 'true', the secret data is expected to be base64-encoded string and would be sent as is.
location String
Location of Secret Manager regional secret resource.
name String
The resource name of the regional secret version. Format: projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}/versions/{{version}}
secret Changes to this property will trigger replacement. String
Secret Manager regional secret resource.


secretData Changes to this property will trigger replacement. String
The secret data. Must be no larger than 64KiB. Note: This property is sensitive and will not be displayed in the plan.
version String
The version of the Regional Secret.

Supporting Types

RegionalSecretVersionCustomerManagedEncryption
, RegionalSecretVersionCustomerManagedEncryptionArgs

KmsKeyVersionName string
(Output) The resource name of the Cloud KMS CryptoKey used to encrypt secret payloads.
KmsKeyVersionName string
(Output) The resource name of the Cloud KMS CryptoKey used to encrypt secret payloads.
kmsKeyVersionName String
(Output) The resource name of the Cloud KMS CryptoKey used to encrypt secret payloads.
kmsKeyVersionName string
(Output) The resource name of the Cloud KMS CryptoKey used to encrypt secret payloads.
kms_key_version_name str
(Output) The resource name of the Cloud KMS CryptoKey used to encrypt secret payloads.
kmsKeyVersionName String
(Output) The resource name of the Cloud KMS CryptoKey used to encrypt secret payloads.

Import

RegionalSecretVersion can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}/versions/{{version}}

When using the pulumi import command, RegionalSecretVersion can be imported using one of the formats above. For example:

$ pulumi import gcp:secretmanager/regionalSecretVersion:RegionalSecretVersion default projects/{{project}}/locations/{{location}}/secrets/{{secret_id}}/versions/{{version}}
Copy

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.