-
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/ssm_parameter: allow adding tags to a parameter if overwrite
is specified
#18640
Conversation
47fe036
to
3108b4b
Compare
38685d9
to
1ca7758
Compare
551c73f
to
bb2ec8d
Compare
bb2ec8d
to
4548347
Compare
|
||
log.Printf("[INFO] Deleting SSM Parameter: %s", d.Id()) | ||
if d.HasChange("data_type") { |
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.
..turns out you can't actually change a "data_type" tho (i tried going from image -> text, but not vice versa yet)
Error: error updating SSM parameter (tf-acc-test-1338304779148665738): ValidationException: You can’t change a parameter’s data type.
status code: 400, request id: d166482e-29ef-4f9c-822d-6c8a0f0f99ca
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 good to me, thank you for the fix and the additional testing 🚀
Output from acceptance testing in AWS Commercial:
--- PASS: TestAccAWSSSMParameter_disappears (31.88s)
--- PASS: TestAccAWSSSMParameter_basic (36.73s)
--- PASS: TestAccAWSSSMParameter_fullPath (36.73s)
--- PASS: TestAccAWSSSMParameter_secure (36.92s)
--- PASS: TestAccAWSSSMParameter_noOverwriteWithTags (38.54s)
--- PASS: TestAccAWSSSMParameter_overwriteWithTags (39.69s)
--- PASS: TestAccAWSSSMParameter_DataType_AwsEc2Image (40.38s)
--- PASS: TestAccAWSSSMParameter_secure_with_key (41.69s)
--- PASS: TestAccAWSSSMParameter_updateType (50.25s)
--- PASS: TestAccAWSSSMParameter_updateDescription (50.27s)
--- PASS: TestAccAWSSSMParameter_changeNameForcesNew (51.27s)
--- PASS: TestAccAWSSSMParameter_updateToOverwriteWithTags (51.48s)
--- PASS: TestAccAWSSSMParameter_overwrite (51.52s)
--- PASS: TestAccAWSSSMParameter_secure_keyUpdate (58.47s)
--- PASS: TestAccAWSSSMParameter_Tier_IntelligentTieringToStandard (63.90s)
--- PASS: TestAccAWSSSMParameter_tags (64.67s)
--- PASS: TestAccAWSSSMParameter_Tier (64.86s)
--- PASS: TestAccAWSSSMParameter_Tier_IntelligentTieringToAdvanced (66.90s)
Output from acceptance testing in AWS GovCloud (US):
--- PASS: TestAccAWSSSMParameter_disappears (25.89s)
--- PASS: TestAccAWSSSMParameter_secure (35.59s)
--- PASS: TestAccAWSSSMParameter_fullPath (35.60s)
--- PASS: TestAccAWSSSMParameter_basic (35.67s)
--- PASS: TestAccAWSSSMParameter_noOverwriteWithTags (35.73s)
--- PASS: TestAccAWSSSMParameter_overwriteWithTags (35.80s)
--- PASS: TestAccAWSSSMParameter_secure_with_key (39.31s)
--- PASS: TestAccAWSSSMParameter_DataType_AwsEc2Image (39.65s)
--- PASS: TestAccAWSSSMParameter_updateType (47.83s)
--- PASS: TestAccAWSSSMParameter_updateDescription (47.88s)
--- PASS: TestAccAWSSSMParameter_overwrite (48.34s)
--- PASS: TestAccAWSSSMParameter_updateToOverwriteWithTags (49.94s)
--- PASS: TestAccAWSSSMParameter_changeNameForcesNew (51.84s)
--- PASS: TestAccAWSSSMParameter_secure_keyUpdate (55.09s)
--- PASS: TestAccAWSSSMParameter_Tier (64.34s)
--- PASS: TestAccAWSSSMParameter_tags (65.55s)
--- PASS: TestAccAWSSSMParameter_Tier_IntelligentTieringToStandard (65.80s)
--- PASS: TestAccAWSSSMParameter_Tier_IntelligentTieringToAdvanced (68.56s)
This has been released in version 3.36.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! |
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 #18550
Description
Tags w/Overwrite handling added to allow for both arguments; in the case of
overwrite
present in a configuration, we pass the value into thePutParameter
request, but iftags
is also present in a configuration, we use the SSM UpdateTags method to modify the resource after creation. ifoverwrite
is not present, however, can set theTags
field in thePutParameter
request without issue.Previously, handling of the argument
overwrite
was handled internally in the resource code with the following, however it did not entirely respect a user configuration when no value was provided.Output from acceptance testing: