Add gcp org policy constraints file to bootstrap stage (#1775)

* add gcp org policy constraints file to bootstrap

* make the org policy factories more resilient
This commit is contained in:
Ludovico Magnocavallo
2023-10-18 20:21:16 +02:00
committed by GitHub
parent b0c552cff5
commit 77a4696aa6
4 changed files with 22 additions and 3 deletions

View File

@@ -0,0 +1,19 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# constraints/gcp.resourceLocations:
# rules:
# - allow:
# values:
# - "in:europe-locations"

View File

@@ -19,7 +19,7 @@
locals {
_factory_data_raw = merge([
for f in try(fileset(var.org_policies_data_path, "*.yaml"), []) :
yamldecode(file("${var.org_policies_data_path}/${f}"))
try(yamldecode(file("${var.org_policies_data_path}/${f}")), {})
]...)
# simulate applying defaults to data coming from yaml files

View File

@@ -19,7 +19,7 @@
locals {
_factory_data_raw = merge([
for f in try(fileset(var.org_policies_data_path, "*.yaml"), []) :
yamldecode(file("${var.org_policies_data_path}/${f}"))
try(yamldecode(file("${var.org_policies_data_path}/${f}")), {})
]...)
# simulate applying defaults to data coming from yaml files

View File

@@ -19,7 +19,7 @@
locals {
_factory_data_raw = merge([
for f in try(fileset(var.org_policies_data_path, "*.yaml"), []) :
yamldecode(file("${var.org_policies_data_path}/${f}"))
try(yamldecode(file("${var.org_policies_data_path}/${f}")), {})
]...)
# simulate applying defaults to data coming from yaml files