-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
r/aws_kms_key: Add xks_key_id argument #31216
Conversation
Community NoteVoting for Prioritization
For Submitters
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welcome @albgus 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
% make testacc TESTARGS='-run=TestAccKMSKey_' PKG=kms
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/kms/... -v -count 1 -parallel 20 -run=TestAccKMSKey_ -timeout 360m
--- PASS: TestAccKMSKey_asymmetricKey (95.13s)
--- PASS: TestAccKMSKey_hmacKey (95.68s)
--- PASS: TestAccKMSKey_disappears (99.46s)
--- PASS: TestAccKMSKey_multiRegion (103.30s)
--- PASS: TestAccKMSKey_Policy_basic (138.54s)
--- PASS: TestAccKMSKey_updateTagsEmptyValue (138.92s)
--- PASS: TestAccKMSKey_basic (139.59s)
--- PASS: TestAccKMSKey_Policy_bypassUpdate (161.08s)
--- PASS: TestAccKMSKey_ignoreTags (165.50s)
--- PASS: TestAccKMSKey_Policy_booleanCondition (167.95s)
--- PASS: TestAccKMSKey_Policy_iamRole (182.49s)
--- PASS: TestAccKMSKey_Policy_iamServiceLinkedRole (197.53s)
--- PASS: TestAccKMSKey_Policy_iamRoleUpdate (198.94s)
--- PASS: TestAccKMSKey_tags (202.04s)
--- PASS: TestAccKMSKey_isEnabled (220.30s)
--- PASS: TestAccKMSKey_Policy_bypass (226.63s)
--- PASS: TestAccKMSKey_Policy_iamRoleOrder (359.66s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/kms 363.249s
@albgus thank you for the contribution! 🎉 |
This functionality has been released in v5.32.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
This adds the
xks_key_id
argument to theaws_kms_key
resource, allowing creation of KMS Keys backed by an External Key Store.Note that the input for this is not fully consistent with the aws_kms_key data source, which returns a
xks_key_configuration
attribute with an id subkey. Thexks_key_id
parameter is consistent with theXksKeyId
parameter to theCreateKey
API Operation though. Not sure what the preferred way would be here but I could try to change the input to takexks_key_confiuguration.id
as well.Relations
Relates #28092
References
Output from Acceptance Testing
Obviously two of the tests failed, however they tags test fails for me on the v4.66.0 tag as well.. The second test seems to fail a bit intermittently, as it succeeded when I re-ran only that test.
Also, I haven't attempted to write any tests for these changes as I don't see any good way to solve this, given that the external key service needs a connection to a 3rd party provider. I suppose the same is true for the Cloud HSM custom key store as well as IIRC the Cloud HSM requires manual initialisation steps.