-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 unable to apply in GovCloud #35512
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
According to the AWS Backup Developer Guide, EBS cold storage archive tier is indeed not supported in the GovCloud regions:
Thus the AWS API is failing as expected. |
But I'm not using the cold storage tier. Why is it expected that if I pass false to an option related to cold storage, the API will fail? |
In the earlier comment I was just making note of the EBS code storage support statement more explicitly. I was still digging into this interesting problem. I believe that the conversion is a result how the Terraform Plugin SDK is handling schema attributes. hashicorp/terraform-plugin-sdk#817 describes the problem and a seeming lack of support for a tri-state boolean (any primitive value for that matter). There are some workarounds but I am not sure which one is the most appropriate architecturally speaking. Terraform is highly discouraging the use of I've also seen in some other AWS resource code that related attributes are used to determine the setting. For example, one could pass in Just leaving some research notes here - I think we'll need a core contributor to chime in. |
Hey @tmccombs 👋 Thanks for another great bug report! Did this come up after upgrading to 5.33.0? Looking at whether this needs a regression label. |
I don't know if it is a regression, this is the first time I've tried creating this resource in a GovCloud region. |
ok thanks. Another thought on this: During creation, if the value is During update, if the value is |
Using 5.32.1 does work for me. |
Thanks for fixing that so quickly! |
This functionality has been released in v5.35.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! |
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. |
Terraform Core Version
1.6.2
AWS Provider Version
5.33.0
Affected Resource(s)
Expected Behavior
Able to create a plan with a rule with a lifecycle in in GovCloud
Actual Behavior
It fails with the error seen below
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Notice that I do not set any parameters related to cold storage.
Steps to Reproduce
I suspect the problem is that the request includes
OptInToArchiveForSupportedResources
(even though I don't supply a value for that). And the AWS API is rejecting that.This might be a bug in the AWS SDK, or even the service itself.
Debug Output
Panic Output
No response
Important Factoids
This might be a bug in the AWS SDK, or even the service itself.
I suspect it has to do with the OptInToArchiveForSupportedResources option that is being passed in the Rules.CopyActions.Lifecycle part of the request.
Possibly Terraform would be able to work around this passing null instead of false to lifecycle.OptInToArchiveForSupportedResources if that option is null or unspecified.
References
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: