-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Terraform wrongly assumes arn to be always be arn:aws (govcloud uses arn:aws-us-gov) #10061
Comments
Just as an update - this also breaks the capability to use kms_key_id in aws_ebs_volume. I wonder why this issue is ignored - see http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-arns the assumptions are wrong - this breaks in govcloud and china region. |
Hi @jc-m, thanks for the issue! I'll make sure this is prioritized early next week and we'll internally begin to put together a solution for you. Sorry for the delay! |
Hi @grubernaut - sorry for the push - i patched terraform to use a map for the namespaces - but i think it might be useful to have a data source which provides this information in addition to internally changing few regexp and sprintf. There are few other peculiarities in each zones that might be helpful to give visibility into (endpoints is one of them) |
Also it's not just S3, to address this problem through the provider I think we'll need to go through all of these:
|
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
The following code:
terraform/builtin/providers/aws/resource_aws_s3_bucket.go
Line 787 in 351c6be
d.Set("arn", fmt.Sprint("arn:aws:s3:::", d.Id()))
wrongly assumes that the arn is always aws. In govcloud region, it is aws-us-gov
Terraform Version
Terraform v0.7.8
Affected Resource(s)
-aws_s3_bucket
-maybe others
Terraform Configuration Files
Debug Output
Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.
Panic Output
If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the
crash.log
.Expected Behavior
state show aws_s3_bucket.test with the correct arn:
arn = arn:aws-us-gov:s3:::bucket-test
Actual Behavior
arn = arn:aws:s3:::bucket-test
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
The text was updated successfully, but these errors were encountered: