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

remove tags field from aws_secretsmanager_secret_rotation resource #27656

Merged
merged 3 commits into from
Nov 7, 2022

Conversation

frek818
Copy link
Contributor

@frek818 frek818 commented Nov 4, 2022

Description

This change removes the useless tags argument from the aws_secretsmanager_secret_rotation resource.

Relations

Closes #27655

Output from Acceptance Testing

$ make testacc TESTARGS='-run=TestAccSecretsManagerSecretRotation' PKG=secretsmanager
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/secretsmanager/... -v -count 1 -parallel 20  -run=TestAccSecretsManagerSecretRotation -timeout 180m
=== RUN   TestAccSecretsManagerSecretRotationDataSource_basic
=== PAUSE TestAccSecretsManagerSecretRotationDataSource_basic
=== RUN   TestAccSecretsManagerSecretRotation_basic
=== PAUSE TestAccSecretsManagerSecretRotation_basic
=== CONT  TestAccSecretsManagerSecretRotationDataSource_basic
=== CONT  TestAccSecretsManagerSecretRotation_basic
--- PASS: TestAccSecretsManagerSecretRotation_basic (53.01s)
--- PASS: TestAccSecretsManagerSecretRotationDataSource_basic (54.90s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/secretsmanager	57.662s

@github-actions
Copy link

github-actions bot commented Nov 4, 2022

Community Note

Voting for Prioritization

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

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/XS Managed by automation to categorize the size of a PR. service/secretsmanager Issues and PRs that pertain to the secretsmanager service. needs-triage Waiting for first response or review from a maintainer. labels Nov 4, 2022
@frek818 frek818 changed the title remove tags remove tags field from aws_secretsmanager_secret_rotation resource Nov 4, 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 @frek818 👋

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

@jar-b jar-b removed the needs-triage Waiting for first response or review from a maintainer. label Nov 7, 2022
Copy link
Member

@jar-b jar-b 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 TESTARGS='-run=TestAccSecretsManagerSecretRotation' PKG=secretsmanager
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/secretsmanager/... -v -count 1 -parallel 20  -run=TestAccSecretsManagerSecretRotation -timeout 180m
=== RUN   TestAccSecretsManagerSecretRotationDataSource_basic
=== PAUSE TestAccSecretsManagerSecretRotationDataSource_basic
=== RUN   TestAccSecretsManagerSecretRotation_basic
=== PAUSE TestAccSecretsManagerSecretRotation_basic
=== CONT  TestAccSecretsManagerSecretRotationDataSource_basic
=== CONT  TestAccSecretsManagerSecretRotation_basic
--- PASS: TestAccSecretsManagerSecretRotation_basic (49.05s)
--- PASS: TestAccSecretsManagerSecretRotationDataSource_basic (52.32s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/secretsmanager     55.051s

@jar-b jar-b merged commit 247f77d into hashicorp:main Nov 7, 2022
@github-actions github-actions bot added this to the v4.39.0 milestone Nov 7, 2022
@jar-b
Copy link
Member

jar-b commented Nov 7, 2022

Nice find and fix @frek818 !

@github-actions
Copy link

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

@007
Copy link
Contributor

007 commented Nov 11, 2022

@jar-b Why a breaking change for a point release?

@jar-b
Copy link
Member

jar-b commented Nov 11, 2022

In this case we decided to move forward with removing the attribute (versus deprecating and removing in v5) because the practitioner impact should be minimal while solving the issue documented in #27655. The underlying resource doesn't support tags, and the tags attribute was never included in the website documentation.

#27597 is a similar situation where while technically breaking, the attributes modified are always computed and therefore unlikely to break a real world configuration. That changelog entry is categorized as a bug, as this could have been, but I opted for breaking to be transparent in the case this does have an unexpected impact and we need to roll back.

Hope this helps to explain the line of thinking here, and please open an issue and link to this PR if you have any concerns.

@jar-b jar-b added the breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. label Nov 11, 2022
@shidel-dev
Copy link

@jar-b how do I upgrade in the case where my state already has the tag attribute? Seeing errors like Error decoding "......" from previous state: unsupported attribute "tags when running a plan

@shidel-dev
Copy link

shidel-dev commented Dec 5, 2022

Maybe only an issue when doing resource targeting, as it needs to read previous state in this case instead of recomputing?

I was supplying some targets, and doing a non targeted plan was a way to work around this.

@jar-b
Copy link
Member

jar-b commented Dec 6, 2022

@shidel-dev - Are you still observing the error above?

If so, do you mind opening a separate issue with your terraform configuration and the plugin versions (previous and version you upgraded to)? We want to track any upgrade issues this may be causing.

@shidel-dev
Copy link

I was observing it until I rebuilt my remote state with terraform apply -refresh-only -auto-approve. I think anyone that has remote state with this resource in it will have this issue if they run plan, or apply with targets. Rebuilding the state seems like a reasonable workaround.

@rossbush
Copy link

rossbush commented Dec 7, 2022

We are applying with targets.

I am going to try the rebuild state as mentioned above terraform apply -refresh-only -auto-approve

@github-actions
Copy link

github-actions bot commented Jan 7, 2023

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 Jan 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking-change Introduces a breaking change in current functionality; usually deferred to the next major release. service/secretsmanager Issues and PRs that pertain to the secretsmanager service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: The aws_secretmanager_secret_rotation plan file includes a tags field but tags aren't supported
5 participants