-
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
KMS asymmetric keys #11062
KMS asymmetric keys #11062
Conversation
@@ -44,11 +44,27 @@ func resourceAwsKmsKey() *schema.Resource { | |||
"key_usage": { | |||
Type: schema.TypeString, | |||
Optional: true, | |||
Computed: true, | |||
Default: kms.KeyUsageTypeEncryptDecrypt, |
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.
Set Default
rather than marking as Computed
.
@@ -113,11 +131,8 @@ func TestAccAWSKmsKey_disappears(t *testing.T) { | |||
Config: testAccAWSKmsKey(rName), | |||
Check: resource.ComposeTestCheckFunc( | |||
testAccCheckAWSKmsKeyExists(resourceName, &key), | |||
testAccCheckAWSKmsKeyDisappears(&key), |
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.
Actually delete the KMS key 😄.
@@ -222,6 +243,13 @@ func TestAccAWSKmsKey_tags(t *testing.T) { | |||
ImportStateVerify: true, | |||
ImportStateVerifyIgnore: []string{"deletion_window_in_days"}, | |||
}, | |||
{ |
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.
Ensure tags are removed.
deletion_window_in_days = 7 | ||
|
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.
No policy
or tags
for basic configuration.
@bflad hello, could you help with review and approval? |
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.
Looks great, @ewbankkit, thanks so much 🚀
Output from acceptance testing:
--- PASS: TestAccDataSourceAwsKmsKey_basic (28.69s)
--- PASS: TestAccAWSKmsKey_disappears (7.85s)
--- PASS: TestAccAWSKmsKey_asymmetricKey (28.29s)
--- PASS: TestAccAWSKmsKey_basic (28.83s)
--- PASS: TestAccAWSKmsKey_tags (33.60s)
--- PASS: TestAccAWSKmsKey_policy (34.15s)
--- PASS: TestAccAWSKmsKey_isEnabled (311.63s)
@@ -35,41 +40,23 @@ func TestAccDataSourceAwsKmsKey_basic(t *testing.T) { | |||
|
|||
func testAccDataSourceAwsKmsKeyCheck(name string) resource.TestCheckFunc { |
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.
We can get rid of this in the future. 👍
ForceNew: true, | ||
ValidateFunc: validation.StringInSlice([]string{ | ||
"", |
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.
Phew, that validation has been present since the creation of the resource, but I believe this should be okay to remove as it likely generated a difference when applied.
This has been released in version 2.47.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 for triage. Thanks! |
Output from acceptance testing: ``` --- PASS: TestAccDataSourceAwsKmsKey_basic (28.69s) --- PASS: TestAccAWSKmsKey_disappears (7.85s) --- PASS: TestAccAWSKmsKey_asymmetricKey (28.29s) --- PASS: TestAccAWSKmsKey_basic (28.83s) --- PASS: TestAccAWSKmsKey_tags (33.60s) --- PASS: TestAccAWSKmsKey_policy (34.15s) --- PASS: TestAccAWSKmsKey_isEnabled (311.63s) ```
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Closes #11042.
Release note for CHANGELOG:
Output from acceptance testing: