We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7217651 commit 2697d41Copy full SHA for 2697d41
main.tf
@@ -7,6 +7,7 @@ locals {
7
data "aws_region" "current" {}
8
data "aws_partition" "current" {}
9
data "aws_service_principal" "rds" {
10
+ count = var.create && var.create_iam_role ? 1 : 0
11
service_name = "rds"
12
region = data.aws_region.current.region
13
}
@@ -114,7 +115,7 @@ data "aws_iam_policy_document" "assume_role" {
114
115
116
principals {
117
type = "Service"
- identifiers = [data.aws_service_principal.rds.id]
118
+ identifiers = [data.aws_service_principal.rds[0].id]
119
120
121
0 commit comments