mirror of
https://github.com/terraform-aws-modules/terraform-aws-rds-proxy.git
synced 2025-12-17 16:31:11 +00:00
fix: replace string service principal with datasource to get rid of malformed policy error in China partition
This commit is contained in:
parent
1fc2397af6
commit
7217651b59
1 changed files with 5 additions and 2 deletions
7
main.tf
7
main.tf
|
|
@ -6,7 +6,10 @@ locals {
|
|||
|
||||
data "aws_region" "current" {}
|
||||
data "aws_partition" "current" {}
|
||||
|
||||
data "aws_service_principal" "rds" {
|
||||
service_name = "rds"
|
||||
region = data.aws_region.current.region
|
||||
}
|
||||
################################################################################
|
||||
# RDS Proxy
|
||||
################################################################################
|
||||
|
|
@ -111,7 +114,7 @@ data "aws_iam_policy_document" "assume_role" {
|
|||
|
||||
principals {
|
||||
type = "Service"
|
||||
identifiers = distinct(["rds.${data.aws_partition.current.dns_suffix}", "rds.amazonaws.com"])
|
||||
identifiers = [data.aws_service_principal.rds.id]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue