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:
- Replica
Region string - The target region for replica key.
- Description string
- The description of the replicated regional key.
- Key
Id string - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- Key
Name string - The name of the key. Note: Only multi-region keys support replication.
- Keyring
Name string - The name of the keyring.
-
List<Replicate
Key Tag> - Tags.
- Replica
Region string - The target region for replica key.
- Description string
- The description of the replicated regional key.
- Key
Id string - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- Key
Name string - The name of the key. Note: Only multi-region keys support replication.
- Keyring
Name string - The name of the keyring.
-
[]Replicate
Key Tag Args - Tags.
- replica
Region String - The target region for replica key.
- description String
- The description of the replicated regional key.
- key
Id String - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- key
Name String - The name of the key. Note: Only multi-region keys support replication.
- keyring
Name String - The name of the keyring.
-
List<Replicate
Key Tag> - Tags.
- replica
Region string - The target region for replica key.
- description string
- The description of the replicated regional key.
- key
Id string - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- key
Name string - The name of the key. Note: Only multi-region keys support replication.
- keyring
Name string - The name of the keyring.
-
Replicate
Key Tag[] - 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.
-
Sequence[Replicate
Key Tag Args] - Tags.
- replica
Region String - The target region for replica key.
- description String
- The description of the replicated regional key.
- key
Id String - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- key
Name String - The name of the key. Note: Only multi-region keys support replication.
- keyring
Name String - The name of the keyring.
- 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.
- Replica
Key stringId - The id of the replica key.
- Id string
- The provider-assigned unique ID for this managed resource.
- Replica
Key stringId - The id of the replica key.
- id String
- The provider-assigned unique ID for this managed resource.
- replica
Key StringId - The id of the replica key.
- id string
- The provider-assigned unique ID for this managed resource.
- replica
Key stringId - The id of the replica key.
- id str
- The provider-assigned unique ID for this managed resource.
- replica_
key_ strid - The id of the replica key.
- id String
- The provider-assigned unique ID for this managed resource.
- replica
Key StringId - 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) -> ReplicateKeyfunc 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.
- Description string
- The description of the replicated regional key.
- Key
Id string - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- Key
Name string - The name of the key. Note: Only multi-region keys support replication.
- Keyring
Name string - The name of the keyring.
- Replica
Key stringId - The id of the replica key.
- Replica
Region string - The target region for replica key.
-
List<Replicate
Key Tag> - Tags.
- Description string
- The description of the replicated regional key.
- Key
Id string - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- Key
Name string - The name of the key. Note: Only multi-region keys support replication.
- Keyring
Name string - The name of the keyring.
- Replica
Key stringId - The id of the replica key.
- Replica
Region string - The target region for replica key.
-
[]Replicate
Key Tag Args - Tags.
- description String
- The description of the replicated regional key.
- key
Id String - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- key
Name String - The name of the key. Note: Only multi-region keys support replication.
- keyring
Name String - The name of the keyring.
- replica
Key StringId - The id of the replica key.
- replica
Region String - The target region for replica key.
-
List<Replicate
Key Tag> - Tags.
- description string
- The description of the replicated regional key.
- key
Id string - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- key
Name string - The name of the key. Note: Only multi-region keys support replication.
- keyring
Name string - The name of the keyring.
- replica
Key stringId - The id of the replica key.
- replica
Region string - The target region for replica key.
-
Replicate
Key Tag[] - 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_ strid - The id of the replica key.
- replica_
region str - The target region for replica key.
-
Sequence[Replicate
Key Tag Args] - Tags.
- description String
- The description of the replicated regional key.
- key
Id String - The id of the key. When key_id is not specified, both keyring_name and key_name must be specified.
- key
Name String - The name of the key. Note: Only multi-region keys support replication.
- keyring
Name String - The name of the keyring.
- replica
Key StringId - The id of the replica key.
- replica
Region String - The target region for replica key.
- List<Property Map>
- Tags.
Supporting Types
ReplicateKeyTag, ReplicateKeyTagArgs
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
volcengineTerraform Provider.
