Merge pull request #276 from terraform-google-modules/vpc-sc-fix
Fix `accessible_services` logic on `vpc-sc` module
This commit is contained in:
commit
c1631bfd97
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue