fix logic on module

This commit is contained in:
Lorenzo Caggioni 2021-07-16 09:50:51 +02:00
parent 66ce91c59d
commit a793f62bd4
2 changed files with 3 additions and 2 deletions

View File

@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
- support for creation of GKE Autopilot clusters
- Add support for CMEK keys in Data Foundation end to end example
- Add support for VPC-SC perimeters in Data Foundation end to end example
- Fix `vpc-sc` module
## [5.0.0] - 2021-06-17

View File

@ -86,7 +86,7 @@ resource "google_access_context_manager_service_perimeter" "standard" {
)
dynamic "vpc_accessible_services" {
for_each = each.value.enforced_config.vpc_accessible_services != [] ? [""] : []
for_each = try(length(each.value.enforced_config.vpc_accessible_services) != 0 ? [""] : [], [])
content {
enable_restriction = true
@ -199,7 +199,7 @@ resource "google_access_context_manager_service_perimeter" "standard" {
)
dynamic "vpc_accessible_services" {
for_each = try(each.value.dry_run_config.vpc_accessible_services != [] ? [""] : [], [])
for_each = try(length(each.value.dry_run_config.vpc_accessible_services) != 0 ? [""] : [], [])
content {
enable_restriction = true