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

r/aws_ssm_parameter: Mark version as computed when value changes #22522

Merged
merged 2 commits into from
Jan 11, 2022

Conversation

argggh
Copy link
Contributor

@argggh argggh commented Jan 11, 2022

Ensure we refresh the version field when updating the contents of an SSM parameter. (Drive-by: Correct use of inconsistent
resources in TestAccSSMParameter_overwrite test phases.)

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #12213.

Output from acceptance testing:

Acceptance test output:

$ make testacc TESTS=TestAccSSMParameter_overwrite PKG=ssm
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ssm/... -v -count 1 -parallel 20 -run='TestAccSSMParameter_overwrite' -timeout 180m
=== RUN   TestAccSSMParameter_overwrite
=== PAUSE TestAccSSMParameter_overwrite
=== RUN   TestAccSSMParameter_overwriteCascade
=== PAUSE TestAccSSMParameter_overwriteCascade
=== RUN   TestAccSSMParameter_overwriteWithTags
=== PAUSE TestAccSSMParameter_overwriteWithTags
=== CONT  TestAccSSMParameter_overwrite
=== CONT  TestAccSSMParameter_overwriteCascade
=== CONT  TestAccSSMParameter_overwriteWithTags
--- PASS: TestAccSSMParameter_overwriteWithTags (34.18s)
--- PASS: TestAccSSMParameter_overwrite (56.54s)
--- PASS: TestAccSSMParameter_overwriteCascade (87.87s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ssm        87.972s

Ensure we refresh the `version` field when updating the contents of an
SSM parameter. Fixes hashicorp#12213. (Drive-by: Correct use of inconsistent
resources in `TestAccSSMParameter_overwrite` test phases.)

Acceptance test output:

$ make testacc TESTS=TestAccSSMParameter_overwrite PKG=ssm
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ssm/... -v -count 1 -parallel 20 -run='TestAccSSMParameter_overwrite' -timeout 180m
=== RUN   TestAccSSMParameter_overwrite
=== PAUSE TestAccSSMParameter_overwrite
=== RUN   TestAccSSMParameter_overwriteCascade
=== PAUSE TestAccSSMParameter_overwriteCascade
=== RUN   TestAccSSMParameter_overwriteWithTags
=== PAUSE TestAccSSMParameter_overwriteWithTags
=== CONT  TestAccSSMParameter_overwrite
=== CONT  TestAccSSMParameter_overwriteCascade
=== CONT  TestAccSSMParameter_overwriteWithTags
--- PASS: TestAccSSMParameter_overwriteWithTags (34.18s)
--- PASS: TestAccSSMParameter_overwrite (56.54s)
--- PASS: TestAccSSMParameter_overwriteCascade (87.87s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ssm        87.972s
@github-actions github-actions bot added service/ssm Issues and PRs that pertain to the ssm service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. needs-triage Waiting for first response or review from a maintainer. size/S Managed by automation to categorize the size of a PR. labels Jan 11, 2022
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome @argggh 👋

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 CONTRIBUTING 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! 😃

@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Jan 11, 2022
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀.

% make testacc TESTS=TestAccSSMParameter_ PKG=ssm         
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/ssm/... -v -count 1 -parallel 20 -run='TestAccSSMParameter_' -timeout 180m
=== RUN   TestAccSSMParameter_basic
=== PAUSE TestAccSSMParameter_basic
=== RUN   TestAccSSMParameter_tier
=== PAUSE TestAccSSMParameter_tier
=== RUN   TestAccSSMParameter_Tier_intelligentTieringToStandard
=== PAUSE TestAccSSMParameter_Tier_intelligentTieringToStandard
=== RUN   TestAccSSMParameter_Tier_intelligentTieringToAdvanced
=== PAUSE TestAccSSMParameter_Tier_intelligentTieringToAdvanced
=== RUN   TestAccSSMParameter_disappears
=== PAUSE TestAccSSMParameter_disappears
=== RUN   TestAccSSMParameter_overwrite
=== PAUSE TestAccSSMParameter_overwrite
=== RUN   TestAccSSMParameter_overwriteCascade
=== PAUSE TestAccSSMParameter_overwriteCascade
=== RUN   TestAccSSMParameter_overwriteWithTags
=== PAUSE TestAccSSMParameter_overwriteWithTags
=== RUN   TestAccSSMParameter_noOverwriteWithTags
=== PAUSE TestAccSSMParameter_noOverwriteWithTags
=== RUN   TestAccSSMParameter_updateToOverwriteWithTags
=== PAUSE TestAccSSMParameter_updateToOverwriteWithTags
=== RUN   TestAccSSMParameter_tags
=== PAUSE TestAccSSMParameter_tags
=== RUN   TestAccSSMParameter_updateType
=== PAUSE TestAccSSMParameter_updateType
=== RUN   TestAccSSMParameter_updateDescription
=== PAUSE TestAccSSMParameter_updateDescription
=== RUN   TestAccSSMParameter_changeNameForcesNew
=== PAUSE TestAccSSMParameter_changeNameForcesNew
=== RUN   TestAccSSMParameter_fullPath
=== PAUSE TestAccSSMParameter_fullPath
=== RUN   TestAccSSMParameter_secure
=== PAUSE TestAccSSMParameter_secure
=== RUN   TestAccSSMParameter_DataType_awsEC2Image
=== PAUSE TestAccSSMParameter_DataType_awsEC2Image
=== RUN   TestAccSSMParameter_secureWithKey
=== PAUSE TestAccSSMParameter_secureWithKey
=== RUN   TestAccSSMParameter_Secure_keyUpdate
=== PAUSE TestAccSSMParameter_Secure_keyUpdate
=== CONT  TestAccSSMParameter_basic
=== CONT  TestAccSSMParameter_tags
=== CONT  TestAccSSMParameter_overwrite
=== CONT  TestAccSSMParameter_updateToOverwriteWithTags
=== CONT  TestAccSSMParameter_noOverwriteWithTags
=== CONT  TestAccSSMParameter_overwriteWithTags
=== CONT  TestAccSSMParameter_overwriteCascade
=== CONT  TestAccSSMParameter_Tier_intelligentTieringToAdvanced
=== CONT  TestAccSSMParameter_secure
=== CONT  TestAccSSMParameter_Secure_keyUpdate
=== CONT  TestAccSSMParameter_secureWithKey
=== CONT  TestAccSSMParameter_disappears
=== CONT  TestAccSSMParameter_DataType_awsEC2Image
=== CONT  TestAccSSMParameter_changeNameForcesNew
=== CONT  TestAccSSMParameter_Tier_intelligentTieringToStandard
=== CONT  TestAccSSMParameter_fullPath
=== CONT  TestAccSSMParameter_updateDescription
=== CONT  TestAccSSMParameter_tier
=== CONT  TestAccSSMParameter_updateType
--- PASS: TestAccSSMParameter_disappears (36.52s)
--- PASS: TestAccSSMParameter_secure (48.07s)
--- PASS: TestAccSSMParameter_overwriteWithTags (48.26s)
--- PASS: TestAccSSMParameter_noOverwriteWithTags (53.08s)
--- PASS: TestAccSSMParameter_fullPath (53.32s)
--- PASS: TestAccSSMParameter_basic (53.45s)
--- PASS: TestAccSSMParameter_secureWithKey (55.48s)
--- PASS: TestAccSSMParameter_DataType_awsEC2Image (67.67s)
--- PASS: TestAccSSMParameter_changeNameForcesNew (75.75s)
--- PASS: TestAccSSMParameter_updateDescription (76.22s)
--- PASS: TestAccSSMParameter_overwrite (76.22s)
--- PASS: TestAccSSMParameter_updateType (76.22s)
--- PASS: TestAccSSMParameter_updateToOverwriteWithTags (76.22s)
--- PASS: TestAccSSMParameter_Secure_keyUpdate (79.72s)
--- PASS: TestAccSSMParameter_overwriteCascade (83.19s)
--- PASS: TestAccSSMParameter_Tier_intelligentTieringToStandard (85.47s)
--- PASS: TestAccSSMParameter_tags (89.02s)
--- PASS: TestAccSSMParameter_tier (90.01s)
--- PASS: TestAccSSMParameter_Tier_intelligentTieringToAdvanced (94.11s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/ssm	98.034s

@ewbankkit ewbankkit merged commit 3e26096 into hashicorp:main Jan 11, 2022
@github-actions github-actions bot added this to the v3.72.0 milestone Jan 11, 2022
@github-actions
Copy link

This functionality has been released in v3.72.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!

@github-actions
Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
service/ssm Issues and PRs that pertain to the ssm service. size/S Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_ssm_parameter resource does not detect version changes due to changes in value
2 participants