terraform-aws-modules / terraform-aws-rds-aurora

Terraform module to create AWS RDS Aurora resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/rds-aurora/aws
Apache License 2.0
386 stars 576 forks source link

Error when creating role in China #437

Closed stephenrjohnson closed 8 months ago

stephenrjohnson commented 8 months ago

https://github.com/terraform-aws-modules/terraform-aws-rds-aurora/blame/ec99016a364fe7abee822f78a11b8ccfccaa70d9/main.tf#L240

Error: │ Error: creating IAM Role (terraform-20240314084919599800000001): MalformedPolicyDocument: Invalid principal in policy: "SERVICE":"monitoring.rds.amazonaws.com.cn" │ status code: 400, request id: 607f6a7e-6557-4b0d-90d3-822172f306c4 │ │ with module.rds.module.rds_cluster.aws_iam_role.rds_enhanced_monitoring[0], │ on .terraform/modules/rds.rds_cluster/main.tf line 245, in resource "aws_iam_role" "rds_enhanced_monitoring": │ 245: resource "aws_iam_role" "rds_enhanced_monitoring" {

On opening a role that works in China it's { "Version": "2012-10-17", "Statement": [ { "Sid": "", "Effect": "Allow", "Principal": { "Service": "monitoring.rds.amazonaws.com" }, "Action": "sts:AssumeRole" } ] }

So it seems to me in china the suffix should be .com for ht service, unless I'm missing something. Can anyone else confirm this is the case?

stephenrjohnson commented 8 months ago

Is this s bug in AWS RDS China?

antonbabenko commented 8 months ago

This issue has been resolved in version 9.3.1 :tada:

github-actions[bot] commented 7 months ago

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.