» alicloud_kms_alias

Create an alias for the master key (CMK).

» Example Usage

Basic Usage

resource "alicloud_kms_key" "this" {}

resource "alicloud_kms_alias" "this" {
  alias_name = "alias/test_kms_alias"
  key_id = alicloud_kms_key.this.id
}

» Argument Reference

The following arguments are supported:

  • alias_name - (Required, ForceNew) The alias of CMK. EncryptGenerateDataKeyDescribeKey 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.

» Attributes Reference

  • id - The ID of the alias.

» Import

KMS alias can be imported using the id, e.g.

$ terraform import alicloud_kms_alias.example alias/test_kms_alias