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

[Bug]: existing aws_secretmanager_secret unusable after upgrade to 5.0.0 #31623

Open
Tracked by #2539
lpiob opened this issue May 29, 2023 · 3 comments
Open
Tracked by #2539

[Bug]: existing aws_secretmanager_secret unusable after upgrade to 5.0.0 #31623

lpiob opened this issue May 29, 2023 · 3 comments
Labels
bug Addresses a defect in current functionality. service/secretsmanager Issues and PRs that pertain to the secretsmanager service.

Comments

@lpiob
Copy link

lpiob commented May 29, 2023

Terraform Core Version

0.14.5

AWS Provider Version

5.0.1

Affected Resource(s)

  • aws_secretmanager_secret

Expected Behavior

aws_secretmanager_secret should be readable using data, just as they were before 5.0.0

Actual Behavior

Failed to marshal state to json: unsupported attribute "rotation_enabled"

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

data "aws_secretsmanager_secret" "rds_connection_string" {
  arn = "somearn"
}

Steps to Reproduce

  1. Create a new terraform with the code above.
  2. Execute it with 4.x provider. Let the state file be created.
  3. Upgrade to 5.0.1 provider
  4. Observe the error while reading data.aws_secretsmanager_secret

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

It seems that the bug was introduced in #31487

Would you like to implement a fix?

No

@lpiob lpiob added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels May 29, 2023
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/secretsmanager Issues and PRs that pertain to the secretsmanager service. label May 29, 2023
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Jun 1, 2023
@codingtony-candid
Copy link

I have the same issue while upgrading the aws provider from v3 to v5.

terraform plan -out=plan.out 
terraform show -json plan.out
+ terraform show -json  plan.out
Failed to marshal plan to json: error marshaling prior state: unsupported attribute "rotation_enabled"% 

@lachlancooper
Copy link
Contributor

I encountered this issue and found the solution mentioned here.

Running a terraform state refresh (or just a terraform apply with no changes) will upgrade the state and remove the deprecated fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. service/secretsmanager Issues and PRs that pertain to the secretsmanager service.
Projects
None yet
Development

No branches or pull requests

4 participants