Replica Key
Manages a KMS multi-Region replica key.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.Provider;
import com.pulumi.aws.ProviderArgs;
import com.pulumi.aws.kms.Key;
import com.pulumi.aws.kms.KeyArgs;
import com.pulumi.aws.kms.ReplicaKey;
import com.pulumi.aws.kms.ReplicaKeyArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var primary = new Provider("primary", ProviderArgs.builder()
.region("us-east-1")
.build());
var primaryKey = new Key("primaryKey", KeyArgs.builder()
.description("Multi-Region primary key")
.deletionWindowInDays(30)
.multiRegion(true)
.build(), CustomResourceOptions.builder()
.provider(aws.primary())
.build());
var replica = new ReplicaKey("replica", ReplicaKeyArgs.builder()
.description("Multi-Region replica key")
.deletionWindowInDays(7)
.primaryKeyArn(primaryKey.arn())
.build());
}
}
Content copied to clipboard
Import
Using pulumi import
, import KMS multi-Region replica keys using the id
. For example:
$ pulumi import aws:kms/replicaKey:ReplicaKey example 1234abcd-12ab-34cd-56ef-1234567890ab
Content copied to clipboard
Properties
Link copied to clipboard
A flag to indicate whether to bypass the key policy lockout safety check. Setting this value to true increases the risk that the KMS key becomes unmanageable. Do not set this value to true indiscriminately. For more information, refer to the scenario in the Default Key Policy section in the AWS Key Management Service Developer Guide. The default value is false
.
Link copied to clipboard
Link copied to clipboard
The cryptographic operations for which you can use the KMS key. This is a shared property of multi-Region keys.
Link copied to clipboard
The key policy to attach to the KMS key. If you do not specify a key policy, AWS KMS attaches the default key policy to the KMS key.