alicloud_kms_client_key

Provides a KMS Client Key resource. Client key (of Application Access Point).

For information about KMS Client Key and how to use it, see What is Client Key.

Example Usage

Basic Usage

variable "name" {
  default = "terraform-example"
}

resource "alicloud_kms_application_access_point" "AAP0" {
  policies                      = ["aa"]
  description                   = "aa"
  application_access_point_name = var.name
}

resource "alicloud_kms_client_key" "default" {
  aap_name              = alicloud_kms_application_access_point.AAP0.application_access_point_name
  password              = "YouPassword123!"
  not_before            = "2023-09-01T14:11:22Z"
  not_after             = "2028-09-01T14:11:22Z"
  private_key_data_file = "./private_key_data_file.txt"
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

Import

KMS Client Key can be imported using the id, e.g.

$ terraform import alicloud_kms_client_key.example <id>

Resource attributes such as password, private_key_data_file are not available for imported resources as this information cannot be read from the KMS API.