Merge pull request #276 from terraform-google-modules/vpc-sc-fix

Fix `accessible_services` logic on `vpc-sc` module
This commit is contained in:
lcaggio 2021-07-16 12:48:14 +02:00 committed by GitHub
commit c1631bfd97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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