Creates a multi-region primary KMS key in the US East (N. Virginia) region and a replica key in the US West (Oregon) region.

Terraform Template

resource "aws_kms_key" "primary" {
  deletion_window_in_days = 30
  description = "Multi-Region primary key"
  multi_region = true
  provider = "aws.primary"
}

resource "aws_kms_replica_key" "replica" {
  deletion_window_in_days = 7
  description = "Multi-Region replica key"
  primary_key_arn = aws_kms_key.primary.arn
}