1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. secretmanager
  5. RegionalSecretVersion
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

gcp.secretmanager.RegionalSecretVersion

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

    A regional secret version resource.

    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",
    });
    
    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")
    
    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, "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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    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
    

    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,
    });
    
    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)
    
    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 {
    		_, 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
    	})
    }
    
    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,
        });
    
    });
    
    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 regionalSecretVersionBase64 = new RegionalSecretVersion("regionalSecretVersionBase64", RegionalSecretVersionArgs.builder()
                .secret(secret_basic.id())
                .secretData(StdFunctions.filebase64(Filebase64Args.builder()
                    .input("secret-data.pfx")
                    .build()).result())
                .isSecretDataBase64(true)
                .build());
    
        }
    }
    
    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
    

    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,
    });
    
    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)
    
    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, "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
    	})
    }
    
    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,
        });
    
    });
    
    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());
    
        }
    }
    
    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
    

    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",
    });
    
    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")
    
    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, "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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    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
    

    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",
    });
    
    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")
    
    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, "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
    	})
    }
    
    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",
        });
    
    });
    
    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());
    
        }
    }
    
    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
    

    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 string
    The unique name of the resource.
    args RegionalSecretVersionArgs
    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 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 string
    The unique name of the resource.
    args RegionalSecretVersionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RegionalSecretVersionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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,
    });
    
    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),
    })
    
    var regionalSecretVersionResource = new RegionalSecretVersion("regionalSecretVersionResource", RegionalSecretVersionArgs.builder()
        .secret("string")
        .secretData("string")
        .deletionPolicy("string")
        .enabled(false)
        .isSecretDataBase64(false)
        .build());
    
    regional_secret_version_resource = gcp.secretmanager.RegionalSecretVersion("regionalSecretVersionResource",
        secret="string",
        secret_data="string",
        deletion_policy="string",
        enabled=False,
        is_secret_data_base64=False)
    
    const regionalSecretVersionResource = new gcp.secretmanager.RegionalSecretVersion("regionalSecretVersionResource", {
        secret: "string",
        secretData: "string",
        deletionPolicy: "string",
        enabled: false,
        isSecretDataBase64: false,
    });
    
    type: gcp:secretmanager:RegionalSecretVersion
    properties:
        deletionPolicy: string
        enabled: false
        isSecretDataBase64: false
        secret: string
        secretData: string
    

    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 string
    Secret Manager regional secret resource.


    SecretData 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 bool
    If set to 'true', the secret data is expected to be base64-encoded string and would be sent as is.
    Secret string
    Secret Manager regional secret resource.


    SecretData 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 bool
    If set to 'true', the secret data is expected to be base64-encoded string and would be sent as is.
    secret String
    Secret Manager regional secret resource.


    secretData 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 Boolean
    If set to 'true', the secret data is expected to be base64-encoded string and would be sent as is.
    secret string
    Secret Manager regional secret resource.


    secretData 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 boolean
    If set to 'true', the secret data is expected to be base64-encoded string and would be sent as is.
    secret str
    Secret Manager regional secret resource.


    secret_data 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 bool
    If set to 'true', the secret data is expected to be base64-encoded string and would be sent as is.
    secret String
    Secret Manager regional secret resource.


    secretData 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 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)
    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.
    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 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 string
    Secret Manager regional secret resource.


    SecretData 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 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 string
    Secret Manager regional secret resource.


    SecretData 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 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 String
    Secret Manager regional secret resource.


    secretData 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 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 string
    Secret Manager regional secret resource.


    secretData 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 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 str
    Secret Manager regional secret resource.


    secret_data 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 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 String
    Secret Manager regional secret resource.


    secretData 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}}
    

    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.
    gcp logo
    Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi