Create an alias for the master key (CMK).
Basic Usage
resource "alicloud_kms_key" "this" {
pending_window_in_days = 7
}
resource "alicloud_kms_alias" "this" {
alias_name = "alias/example_kms_alias"
key_id = alicloud_kms_key.this.id
}
The following arguments are supported:
alias_name
- (Required, ForceNew) The alias of CMK. Encrypt
、GenerateDataKey
、DescribeKey
can be called using aliases. Length of characters other than prefixes: minimum length of 1 character and maximum length of 255 characters. Must contain prefix alias/
.key_id
- (Required) The id of the key.id
- The ID of the alias.KMS alias can be imported using the id, e.g.
$ terraform import alicloud_kms_alias.example alias/test_kms_alias