File tree Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -162,10 +162,10 @@ resource "google_sql_database_instance" "default" {
162
162
allowed_consumer_projects = ip_configuration. value . psc_allowed_consumer_projects
163
163
164
164
dynamic "psc_auto_connections" {
165
- for_each = ip_configuration. value . psc_auto_connections
165
+ for_each = lookup ( ip_configuration. value , " psc_auto_connections" , [])
166
166
content {
167
- consumer_network = each . value . consumer_network
168
- consumer_service_project_id = each . value . consumer_service_project_id
167
+ consumer_network = psc_auto_connections . value . consumer_network
168
+ consumer_service_project_id = psc_auto_connections . value . consumer_service_project_id
169
169
}
170
170
}
171
171
}
Original file line number Diff line number Diff line change @@ -94,10 +94,10 @@ resource "google_sql_database_instance" "replicas" {
94
94
allowed_consumer_projects = ip_configuration. value . psc_allowed_consumer_projects
95
95
96
96
dynamic "psc_auto_connections" {
97
- for_each = ip_configuration. value . psc_auto_connections
97
+ for_each = lookup ( ip_configuration. value , " psc_auto_connections" , [])
98
98
content {
99
- consumer_network = each . value . consumer_network
100
- consumer_service_project_id = each . value . consumer_service_project_id
99
+ consumer_network = psc_auto_connections . value . consumer_network
100
+ consumer_service_project_id = psc_auto_connections . value . consumer_service_project_id
101
101
}
102
102
}
103
103
}
Original file line number Diff line number Diff line change @@ -147,10 +147,10 @@ resource "google_sql_database_instance" "default" {
147
147
allowed_consumer_projects = ip_configuration. value . psc_allowed_consumer_projects
148
148
149
149
dynamic "psc_auto_connections" {
150
- for_each = ip_configuration. value . psc_auto_connections
150
+ for_each = lookup ( ip_configuration. value , " psc_auto_connections" , [])
151
151
content {
152
- consumer_network = each . value . consumer_network
153
- consumer_service_project_id = each . value . consumer_service_project_id
152
+ consumer_network = psc_auto_connections . value . consumer_network
153
+ consumer_service_project_id = psc_auto_connections . value . consumer_service_project_id
154
154
}
155
155
}
156
156
}
Original file line number Diff line number Diff line change @@ -69,10 +69,10 @@ resource "google_sql_database_instance" "replicas" {
69
69
allowed_consumer_projects = ip_configuration. value . psc_enabled ? ip_configuration. value . psc_allowed_consumer_projects : []
70
70
71
71
dynamic "psc_auto_connections" {
72
- for_each = ip_configuration. value . psc_auto_connections
72
+ for_each = lookup ( ip_configuration. value , " psc_auto_connections" , [])
73
73
content {
74
- consumer_network = each . value . consumer_network
75
- consumer_service_project_id = each . value . consumer_service_project_id
74
+ consumer_network = psc_auto_connections . value . consumer_network
75
+ consumer_service_project_id = psc_auto_connections . value . consumer_service_project_id
76
76
}
77
77
}
78
78
}
You can’t perform that action at this time.
0 commit comments