|
| 1 | +--- |
| 2 | +subcategory: "KMS" |
| 3 | +layout: "tencentcloud" |
| 4 | +page_title: "TencentCloud: tencentcloud_kms_key" |
| 5 | +sidebar_current: "docs-tencentcloud-datasource-kms_key" |
| 6 | +description: |- |
| 7 | + Use this data source to query detailed information of KMS key |
| 8 | +--- |
| 9 | + |
| 10 | +# tencentcloud_kms_key |
| 11 | + |
| 12 | +Use this data source to query detailed information of KMS key |
| 13 | + |
| 14 | +## Example Usage |
| 15 | + |
| 16 | +```hcl |
| 17 | +data "tencentcloud_kms_key" "foo" { |
| 18 | + search_key_alias = "test" |
| 19 | + key_state = "All" |
| 20 | + origin = "TENCENT_KMS" |
| 21 | + key_usage = "ALL" |
| 22 | +} |
| 23 | +``` |
| 24 | + |
| 25 | +## Argument Reference |
| 26 | + |
| 27 | +The following arguments are supported: |
| 28 | + |
| 29 | +* `key_state` - (Optional) State of CMK.Available values include `All`, `Enabled`, `Disabled`, `PendingDelete`, `PendingImport`, `Archived`. |
| 30 | +* `key_usage` - (Optional) Usage of CMK.Available values include `ALL`, `ENCRYPT_DECRYPT`, `ASYMMETRIC_DECRYPT_RSA_2048`, `ASYMMETRIC_DECRYPT_SM2`, `ASYMMETRIC_SIGN_VERIFY_SM2`, `ASYMMETRIC_SIGN_VERIFY_RSA_2048`, `ASYMMETRIC_SIGN_VERIFY_ECC`.Default value is `ENCRYPT_DECRYPT`. |
| 31 | +* `order_type` - (Optional) Order to sort the CMK create time.`0` - desc, `1` - asc.Default value is `0`. |
| 32 | +* `origin` - (Optional) Origin of CMK.`TENCENT_KMS` - CMK created by KMS, `EXTERNAL` - CMK imported by user, `ALL` - All CMK.Default value is `ALL`. |
| 33 | +* `result_output_file` - (Optional) Used to save results. |
| 34 | +* `role` - (Optional) Role of the CMK creator.`0` - created by user, `1` - created by cloud product.Default value is `0`. |
| 35 | +* `search_key_alias` - (Optional) Words used to match the results,and the words can be: key_id and alias. |
| 36 | +* `tags` - (Optional) Tags to filter CMK. |
| 37 | + |
| 38 | +## Attributes Reference |
| 39 | + |
| 40 | +In addition to all arguments above, the following attributes are exported: |
| 41 | + |
| 42 | +* `key_list` - A list of KMS keys. |
| 43 | + * `alias` - Name of CMK. |
| 44 | + * `create_time` - Create time of CMK. |
| 45 | + * `creator_uin` - Uin of CMK Creator. |
| 46 | + * `deletion_date` - Delete time of CMK. |
| 47 | + * `description` - Description of CMK. |
| 48 | + * `key_id` - ID of CMK. |
| 49 | + * `key_rotation_enabled` - Specify whether to enable key rotation. |
| 50 | + * `key_state` - State of CMK.Available values include `Enabled`, `Disabled`, `PendingDelete`, `PendingImport`, `Archived`. |
| 51 | + * `key_usage` - Usage of CMK.Available values include `ENCRYPT_DECRYPT`, `ASYMMETRIC_DECRYPT_RSA_2048`, `ASYMMETRIC_DECRYPT_SM2`, `ASYMMETRIC_SIGN_VERIFY_SM2`, `ASYMMETRIC_SIGN_VERIFY_RSA_2048`, `ASYMMETRIC_SIGN_VERIFY_ECC`. |
| 52 | + * `next_rotate_time` - Next rotate time of CMK when key_rotation_enabled is true. |
| 53 | + * `origin` - Origin of CMK.`TENCENT_KMS` - CMK created by KMS, `EXTERNAL` - CMK imported by user. |
| 54 | + * `owner` - Creator of CMK. |
| 55 | + * `valid_to` - Valid when Origin is EXTERNAL, it means the effective date of the key material. |
| 56 | + |
| 57 | + |
0 commit comments