Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KP: Adding attribute registrations for resource instance key and attribute endpoint_type for key policies #5221

Merged
merged 3 commits into from
Mar 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
adding documentation
tyao117 committed Mar 21, 2024
commit d4c5463f0fcac20feaa913ffe06b95621c228c70
6 changes: 3 additions & 3 deletions ibm/service/kms/resource_ibm_kms_key.go
Original file line number Diff line number Diff line change
@@ -149,17 +149,17 @@ func ResourceIBMKmskey() *schema.Resource {
"key_id": {
Type: schema.TypeString,
Computed: true,
Description: "The key id being used in the policy",
Description: "The id of the key being used in the registration",
},
"resource_crn": {
Type: schema.TypeString,
Computed: true,
Description: "The resource crn tied to the registration of the key",
Description: "The CRN of the resource tied to the key registration",
},
"prevent_key_deletion": {
Type: schema.TypeBool,
Computed: true,
Description: "Determines if the registration of a key prevents a deletion.",
Description: "Determines if the registration of the key prevents a deletion.",
},
},
},
2 changes: 2 additions & 0 deletions website/docs/r/kms_instance_policies.html.markdown
Original file line number Diff line number Diff line change
@@ -57,6 +57,8 @@ The following arguments are supported:


- `instance_id` - (Required, String) The key-protect instance ID for creating policies.
- `endpoint_type` - (Optional, String) The type of the public endpoint, or private endpoint to be used for creating keys.

- `rotation` - (Optional,list) The Instance rotation time interval in months, with a minimum of 1, and a maximum of 12.
Nested scheme for `rotation`:

8 changes: 8 additions & 0 deletions website/docs/r/kms_key.html.markdown
Original file line number Diff line number Diff line change
@@ -131,6 +131,13 @@ In addition to all argument reference list, you can access the following attribu
- `key_id` - (String) The ID of the key.
- `key_ring_id` - (String) The ID of the key ring that your Key Protect key belongs to.
- `type` - (String) The type of the key KMS or HPCS.
- `registrations` - (List) The registrations associated with the key.

Nested scheme for `registrations`:
- `key_id` - (String) The id of the key associated with the association.
- `resource_crn` - (String) The CRN of the resource that has a registration to the key.
- `prevent_key_deletion` - (Boolean) Determines if the resource prevents the key deletion.

- `policy` - (String) The policies associated with the key.

Nested scheme for `policy`:
@@ -155,6 +162,7 @@ In addition to all argument reference list, you can access the following attribu
- `last_update_date` - (Timestamp) The date when the policy last replaced or modified. The date format follows RFC 3339.
- `updated_by` - (String) The unique ID for the resource that updated the policy.


## Import
The `ibm_kms_key` can be imported by using the `id` and `crn`.