-
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
there is a different prefix of arn between china region and other region #7309
Comments
Here is a quick fix based on v0.6.16 that works for the aws_db_instance resource:
|
+1 for this problem |
@PxSonny and I are seeing this right now for an issue we're dealing with too. Within China, although Terraform creates the resources fine, we're seeing the following in our Actual: "aws_db_instance.default": {
"type": "aws_db_instance",
"primary": {
"attributes": {
"arn": "arn:aws:rds:cn-north-1:1234:db:name",
},
},
},
"aws_db_subnet_group.default": {
"type": "aws_db_subnet_group",
"primary": {
"attributes": {
"arn": "arn:aws:rds:cn-north-1:1234:subgrp:name",
},
},
}, Expected: "aws_db_instance.default": {
"type": "aws_db_instance",
"primary": {
"attributes": {
"arn": "arn:aws-cn:rds:cn-north-1:1234:db:name",
},
},
},
"aws_db_subnet_group.default": {
"type": "aws_db_subnet_group",
"primary": {
"attributes": {
"arn": "arn:aws-cn:rds:cn-north-1:1234:subgrp:name",
},
},
}, What's interesting is that many other resources seem to handle this case fine. |
@jumping A humble suggestion, would it be possible to change the title of this ticket to "AWS Partition not set in China for aws_db_instance and aws_db_subnet_group" |
hey @jumping Did you want to submit a pull request? |
Any news here? :o |
I believe this affects us-gov-west-1 as well. It has an ARN layout like: arn:aws-us-gov:iam::account_number:role/name_of_role Trying to attach that IAM role to an EC2 instance works fine (as well as Redshift in us-east-1), but Redshift in Terraform fails it for what I suspect is the same reason as this issue. Edit: I want to clarify I've only seen the ARN issue on Redshift Cluster IAM resource attaching in us-gov-west-1 |
Hello, this issue has been fixed in Terraform 0.7.6 |
I think this still needs to be fixed for S3. In #7309 (comment) @jumping mentioned this line:
and the line was not fixed by #9273. |
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. |
I searched the codes under the builtin/provides/aws, found there are hardcode the prefix of arn. Like as "arn:aws:", but the china region has another prefix "arn:aws-cn:". Is it possible to do any change ?
The text was updated successfully, but these errors were encountered: