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]: aws_backup_plan fails to be decoded from state #39730

Closed
bobbywarner opened this issue Oct 15, 2024 · 6 comments
Closed

[Bug]: aws_backup_plan fails to be decoded from state #39730

bobbywarner opened this issue Oct 15, 2024 · 6 comments
Labels
bug Addresses a defect in current functionality. service/backup Issues and PRs that pertain to the backup service.

Comments

@bobbywarner
Copy link

bobbywarner commented Oct 15, 2024

Terraform Core Version

1.8.2

AWS Provider Version

5.70.0

Affected Resource(s)

  • aws_backup_plan

It seems quite coincidental that this PR was merged last week: #33653 🤔

Expected Behavior

Terraform should be able to refresh state for existing aws_backup_plan resources without issues given no version changes were done.

Actual Behavior

Warning: Failed to decode resource from state

Error decoding aws_backup_plan.my_backup from prior state: unsupported attribute "schedule_expression_timezone"

Error: Resource instance managed by newer provider version

The current state of aws_backup_plan.my_backup was created by a newer provider version than is currently selected. Upgrade the aws provider to work with this state.

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

N/A

Steps to Reproduce

Instantiate an aws_backup_plan resource and then try to refresh state with it.

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

No

@bobbywarner bobbywarner added the bug Addresses a defect in current functionality. label Oct 15, 2024
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 service/backup Issues and PRs that pertain to the backup service. needs-triage Waiting for first response or review from a maintainer. labels Oct 15, 2024
@msg555
Copy link

msg555 commented Oct 15, 2024

I believe this is because they pulled version 5.71 which had non-backwards compatible changes to the state for aws_backup_plan objects. I think you either need to manually fix your state or wait for 5.72.

#39724 and #39694 (comment) for some more context

@bobbywarner
Copy link
Author

@msg555 So something like this until 5.72 is released?

terraform state rm aws_backup_plan.my_backup ?

@justinretzolk
Copy link
Member

Hey @bobbywarner 👋 Thank you for taking the time to raise this! As mentioned above, this is likely caused by 5.71.0 having been pulled. The team is in the process of releasing 5.72.0 now though, so I wouldn't bother removing the resource from your state and doing that whole dance, unless you have an urgent need to proceed. Once 5.72.0 is out, you shouldn't encounter any further issues.

@justinretzolk justinretzolk added waiting-response Maintainers are waiting on response from community or contributor. and removed needs-triage Waiting for first response or review from a maintainer. labels Oct 15, 2024
@bobbywarner
Copy link
Author

I removed the aws_backup_plan via AWS Console, removed the resource from Terraform state and then did a Terraform apply to recreate it successfully. Good to go!

Copy link

Warning

This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot removed the waiting-response Maintainers are waiting on response from community or contributor. label Oct 15, 2024
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/backup Issues and PRs that pertain to the backup service.
Projects
None yet
Development

No branches or pull requests

3 participants