1. Packages
  2. Volcengine
  3. API Docs
  4. kms
  5. ReplicateKey
Volcengine v0.0.46 published on Friday, Feb 27, 2026 by Volcengine
volcengine logo
Volcengine v0.0.46 published on Friday, Feb 27, 2026 by Volcengine

    Provides a resource to manage kms replicate key

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@volcengine/pulumi";
    
    // Only create a backup key in the replica region;
    // Next, managing key requires the use of resource "volcengine_kms_key".
    const replica = new volcengine.kms.ReplicateKey("replica", {
        description: "replica description",
        keyName: "mrk-Tf-Test-1",
        keyringName: "test",
        replicaRegion: "cn-shanghai",
        tags: [{
            key: "tfk1",
            value: "tfv1",
        }],
    });
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    # Only create a backup key in the replica region;
    # Next, managing key requires the use of resource "volcengine_kms_key".
    replica = volcengine.kms.ReplicateKey("replica",
        description="replica description",
        key_name="mrk-Tf-Test-1",
        keyring_name="test",
        replica_region="cn-shanghai",
        tags=[volcengine.kms.ReplicateKeyTagArgs(
            key="tfk1",
            value="tfv1",
        )])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/kms"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Only create a backup key in the replica region;
    		// Next, managing key requires the use of resource "volcengine_kms_key".
    		_, err := kms.NewReplicateKey(ctx, "replica", &kms.ReplicateKeyArgs{
    			Description:   pulumi.String("replica description"),
    			KeyName:       pulumi.String("mrk-Tf-Test-1"),
    			KeyringName:   pulumi.String("test"),
    			ReplicaRegion: pulumi.String("cn-shanghai"),
    			Tags: kms.ReplicateKeyTagArray{
    				&kms.ReplicateKeyTagArgs{
    					Key:   pulumi.String("tfk1"),
    					Value: pulumi.String("tfv1"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        // Only create a backup key in the replica region;
        // Next, managing key requires the use of resource "volcengine_kms_key".
        var replica = new Volcengine.Kms.ReplicateKey("replica", new()
        {
            Description = "replica description",
            KeyName = "mrk-Tf-Test-1",
            KeyringName = "test",
            ReplicaRegion = "cn-shanghai",
            Tags = new[]
            {
                new Volcengine.Kms.Inputs.ReplicateKeyTagArgs
                {
                    Key = "tfk1",
                    Value = "tfv1",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.kms.ReplicateKey;
    import com.pulumi.volcengine.kms.ReplicateKeyArgs;
    import com.pulumi.volcengine.kms.inputs.ReplicateKeyTagArgs;
    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) {
            // Only create a backup key in the replica region;
            // Next, managing key requires the use of resource "volcengine_kms_key".
            var replica = new ReplicateKey("replica", ReplicateKeyArgs.builder()        
                .description("replica description")
                .keyName("mrk-Tf-Test-1")
                .keyringName("test")
                .replicaRegion("cn-shanghai")
                .tags(ReplicateKeyTagArgs.builder()
                    .key("tfk1")
                    .value("tfv1")
                    .build())
                .build());
    
        }
    }
    
    resources:
      # Only create a backup key in the replica region;
      # // Next, managing key requires the use of resource "volcengine_kms_key".
      replica:
        type: volcengine:kms:ReplicateKey
        properties:
          description: replica description
          keyName: mrk-Tf-Test-1
          keyringName: test
          replicaRegion: cn-shanghai
          tags:
            - key: tfk1
              value: tfv1
    

    Create ReplicateKey Resource

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

    Constructor syntax

    new ReplicateKey(name: string, args: ReplicateKeyArgs, opts?: CustomResourceOptions);
    @overload
    def ReplicateKey(resource_name: str,
                     args: ReplicateKeyArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def ReplicateKey(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     replica_region: Optional[str] = None,
                     description: Optional[str] = None,
                     key_id: Optional[str] = None,
                     key_name: Optional[str] = None,
                     keyring_name: Optional[str] = None,
                     tags: Optional[Sequence[ReplicateKeyTagArgs]] = None)
    func NewReplicateKey(ctx *Context, name string, args ReplicateKeyArgs, opts ...ResourceOption) (*ReplicateKey, error)
    public ReplicateKey(string name, ReplicateKeyArgs args, CustomResourceOptions? opts = null)
    public ReplicateKey(String name, ReplicateKeyArgs args)
    public ReplicateKey(String name, ReplicateKeyArgs args, CustomResourceOptions options)
    
    type: volcengine:kms:ReplicateKey
    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 ReplicateKeyArgs
    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 ReplicateKeyArgs
    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 ReplicateKeyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ReplicateKeyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ReplicateKeyArgs
    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 replicateKeyResource = new Volcengine.Kms.ReplicateKey("replicateKeyResource", new()
    {
        ReplicaRegion = "string",
        Description = "string",
        KeyId = "string",
        KeyName = "string",
        KeyringName = "string",
        Tags = new[]
        {
            new Volcengine.Kms.Inputs.ReplicateKeyTagArgs
            {
                Key = "string",
                Value = "string",
            },
        },
    });
    
    example, err := kms.NewReplicateKey(ctx, "replicateKeyResource", &kms.ReplicateKeyArgs{
    	ReplicaRegion: pulumi.String("string"),
    	Description:   pulumi.String("string"),
    	KeyId:         pulumi.String("string"),
    	KeyName:       pulumi.String("string"),
    	KeyringName:   pulumi.String("string"),
    	Tags: kms.ReplicateKeyTagArray{
    		&kms.ReplicateKeyTagArgs{
    			Key:   pulumi.String("string"),
    			Value: pulumi.String("string"),
    		},
    	},
    })
    
    var replicateKeyResource = new ReplicateKey("replicateKeyResource", ReplicateKeyArgs.builder()
        .replicaRegion("string")
        .description("string")
        .keyId("string")
        .keyName("string")
        .keyringName("string")
        .tags(ReplicateKeyTagArgs.builder()
            .key("string")
            .value("string")
            .build())
        .build());
    
    replicate_key_resource = volcengine.kms.ReplicateKey("replicateKeyResource",
        replica_region="string",
        description="string",
        key_id="string",
        key_name="string",
        keyring_name="string",
        tags=[{
            "key": "string",
            "value": "string",
        }])
    
    const replicateKeyResource = new volcengine.kms.ReplicateKey("replicateKeyResource", {
        replicaRegion: "string",
        description: "string",
        keyId: "string",
        keyName: "string",
        keyringName: "string",
        tags: [{
            key: "string",
            value: "string",
        }],
    });
    
    type: volcengine:kms:ReplicateKey
    properties:
        description: string
        keyId: string
        keyName: string
        keyringName: string
        replicaRegion: string
        tags:
            - key: string
              value: string
    

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

    ReplicaRegion string
    The target region for replica key.
    Description string
    The description of the replicated regional key.
    KeyId string
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    KeyName string
    The name of the key. Note: Only multi-region keys support replication.
    KeyringName string
    The name of the keyring.
    Tags List<ReplicateKeyTag>
    Tags.
    ReplicaRegion string
    The target region for replica key.
    Description string
    The description of the replicated regional key.
    KeyId string
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    KeyName string
    The name of the key. Note: Only multi-region keys support replication.
    KeyringName string
    The name of the keyring.
    Tags []ReplicateKeyTagArgs
    Tags.
    replicaRegion String
    The target region for replica key.
    description String
    The description of the replicated regional key.
    keyId String
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    keyName String
    The name of the key. Note: Only multi-region keys support replication.
    keyringName String
    The name of the keyring.
    tags List<ReplicateKeyTag>
    Tags.
    replicaRegion string
    The target region for replica key.
    description string
    The description of the replicated regional key.
    keyId string
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    keyName string
    The name of the key. Note: Only multi-region keys support replication.
    keyringName string
    The name of the keyring.
    tags ReplicateKeyTag[]
    Tags.
    replica_region str
    The target region for replica key.
    description str
    The description of the replicated regional key.
    key_id str
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    key_name str
    The name of the key. Note: Only multi-region keys support replication.
    keyring_name str
    The name of the keyring.
    tags Sequence[ReplicateKeyTagArgs]
    Tags.
    replicaRegion String
    The target region for replica key.
    description String
    The description of the replicated regional key.
    keyId String
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    keyName String
    The name of the key. Note: Only multi-region keys support replication.
    keyringName String
    The name of the keyring.
    tags List<Property Map>
    Tags.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    ReplicaKeyId string
    The id of the replica key.
    Id string
    The provider-assigned unique ID for this managed resource.
    ReplicaKeyId string
    The id of the replica key.
    id String
    The provider-assigned unique ID for this managed resource.
    replicaKeyId String
    The id of the replica key.
    id string
    The provider-assigned unique ID for this managed resource.
    replicaKeyId string
    The id of the replica key.
    id str
    The provider-assigned unique ID for this managed resource.
    replica_key_id str
    The id of the replica key.
    id String
    The provider-assigned unique ID for this managed resource.
    replicaKeyId String
    The id of the replica key.

    Look up Existing ReplicateKey Resource

    Get an existing ReplicateKey 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?: ReplicateKeyState, opts?: CustomResourceOptions): ReplicateKey
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            key_id: Optional[str] = None,
            key_name: Optional[str] = None,
            keyring_name: Optional[str] = None,
            replica_key_id: Optional[str] = None,
            replica_region: Optional[str] = None,
            tags: Optional[Sequence[ReplicateKeyTagArgs]] = None) -> ReplicateKey
    func GetReplicateKey(ctx *Context, name string, id IDInput, state *ReplicateKeyState, opts ...ResourceOption) (*ReplicateKey, error)
    public static ReplicateKey Get(string name, Input<string> id, ReplicateKeyState? state, CustomResourceOptions? opts = null)
    public static ReplicateKey get(String name, Output<String> id, ReplicateKeyState state, CustomResourceOptions options)
    resources:  _:    type: volcengine:kms:ReplicateKey    get:      id: ${id}
    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:
    Description string
    The description of the replicated regional key.
    KeyId string
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    KeyName string
    The name of the key. Note: Only multi-region keys support replication.
    KeyringName string
    The name of the keyring.
    ReplicaKeyId string
    The id of the replica key.
    ReplicaRegion string
    The target region for replica key.
    Tags List<ReplicateKeyTag>
    Tags.
    Description string
    The description of the replicated regional key.
    KeyId string
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    KeyName string
    The name of the key. Note: Only multi-region keys support replication.
    KeyringName string
    The name of the keyring.
    ReplicaKeyId string
    The id of the replica key.
    ReplicaRegion string
    The target region for replica key.
    Tags []ReplicateKeyTagArgs
    Tags.
    description String
    The description of the replicated regional key.
    keyId String
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    keyName String
    The name of the key. Note: Only multi-region keys support replication.
    keyringName String
    The name of the keyring.
    replicaKeyId String
    The id of the replica key.
    replicaRegion String
    The target region for replica key.
    tags List<ReplicateKeyTag>
    Tags.
    description string
    The description of the replicated regional key.
    keyId string
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    keyName string
    The name of the key. Note: Only multi-region keys support replication.
    keyringName string
    The name of the keyring.
    replicaKeyId string
    The id of the replica key.
    replicaRegion string
    The target region for replica key.
    tags ReplicateKeyTag[]
    Tags.
    description str
    The description of the replicated regional key.
    key_id str
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    key_name str
    The name of the key. Note: Only multi-region keys support replication.
    keyring_name str
    The name of the keyring.
    replica_key_id str
    The id of the replica key.
    replica_region str
    The target region for replica key.
    tags Sequence[ReplicateKeyTagArgs]
    Tags.
    description String
    The description of the replicated regional key.
    keyId String
    The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
    keyName String
    The name of the key. Note: Only multi-region keys support replication.
    keyringName String
    The name of the keyring.
    replicaKeyId String
    The id of the replica key.
    replicaRegion String
    The target region for replica key.
    tags List<Property Map>
    Tags.

    Supporting Types

    ReplicateKeyTag, ReplicateKeyTagArgs

    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    Key string
    The Key of Tags.
    Value string
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.
    key string
    The Key of Tags.
    value string
    The Value of Tags.
    key str
    The Key of Tags.
    value str
    The Value of Tags.
    key String
    The Key of Tags.
    value String
    The Value of Tags.

    Import

    The KmsReplicateKey is not support imported.

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.46 published on Friday, Feb 27, 2026 by Volcengine
      Meet Neo: Your AI Platform Teammate