-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
aws_s3_bucket: UnsupportedArgument acceleration_status in us-gov region #11556
Comments
I was under the impression that this feature does not exist yet in Govcloud. Has that changed recently? |
Correct, it doesn't. I'm hoping that instead of failing & aborting, the parameter can be ignored similar to the implementation in the referenced ticket #8664. |
Why do you need to keep the parameter around when operating in a region that doesn't support it? Versus just removing the parameter etc... |
Fair question, in our case we operate in multiple regions and this parameter is being set by a module. I don't recall, but passing null didn't seem to work either. I think because null meant the default of We have a couple of variables that indicate this is the gov cloud region and need certain features disabled. On some resources a simple |
@c4milo, I'm going to have to take this one on faith. |
(Okay. Didn't mean to close this. That's what I get for replying on mobile.) Anyway. @c4milo I'm going to take your patch as is. I cannot test it because getting our gov team to run a custom build of the provider will be quite an exercise. Patch is so simple and is handling the error I saw, I expect it'll work perfectly. Thank you for identifying such a simple fix! |
@dekimsey, please keep us posted! |
@dekimsey what is the behaviour of the resource if your |
tl;dr Changing the default value of my So, in my case its the awkward interaction between default variables and this unsupported parameter. Given:
And a
Will cause the default value to be used. Setting the variable to
However. Changing the default value of my |
Hi @dekimsey, sorry for the delay in getting back to this issue. I addressed an associated PR, but left this hanging. To work around the differences in AWS support by region, you could make the value of For example data "aws_region" "current" {}
locals {
acceleration_status = data.aws_region.current.name != "us-gov-west-1" ? "Enabled" : null
}
resource "aws_s3_bucket" "bucket" {
bucket = "my_bucket"
acceleration_status = local. acceleration_status
} I'm going to close this issue since this sample should allow you to work in multiple regions and partitions. If you run into problems, please open another issue. |
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. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Community Note
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Note it doesn't matter if
acceleration_status
is set to Suspended or Enabled.Debug Output
None
Panic Output
None
Expected Behavior
s3 bucket created successfully.
Actual Behavior
Steps to Reproduce
terraform apply
Important Factoids
US government region
References
The text was updated successfully, but these errors were encountered: