make extended shared vpc attributes optional in pf (#1796)
This commit is contained in:
committed by
GitHub
parent
a93f08e833
commit
1ed48b556f
@@ -59,7 +59,7 @@ module "project-factory" {
|
|||||||
data_path = "data"
|
data_path = "data"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# tftest modules=6 resources=14 files=prj-app-1,prj-app-2
|
# tftest modules=6 resources=15 files=prj-app-1,prj-app-2
|
||||||
```
|
```
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
@@ -94,6 +94,8 @@ org_policies:
|
|||||||
iam.disableServiceAccountKeyCreation:
|
iam.disableServiceAccountKeyCreation:
|
||||||
rules:
|
rules:
|
||||||
- enforce: false
|
- enforce: false
|
||||||
|
shared_vpc_service_config:
|
||||||
|
host_project: foo-host
|
||||||
|
|
||||||
# tftest-file id=prj-app-2 path=data/prj-app-2.yaml
|
# tftest-file id=prj-app-2 path=data/prj-app-2.yaml
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -77,9 +77,13 @@ locals {
|
|||||||
try(v.services, null),
|
try(v.services, null),
|
||||||
var.data_defaults.services
|
var.data_defaults.services
|
||||||
)
|
)
|
||||||
shared_vpc_service_config = coalesce(
|
shared_vpc_service_config = (
|
||||||
try(v.shared_vpc_service_config, null),
|
try(v.shared_vpc_service_config, null) != null
|
||||||
var.data_defaults.shared_vpc_service_config
|
? merge(
|
||||||
|
{ service_identity_iam = {}, service_iam_grants = [] },
|
||||||
|
v.shared_vpc_service_config
|
||||||
|
)
|
||||||
|
: var.data_defaults.shared_vpc_service_config
|
||||||
)
|
)
|
||||||
tag_bindings = coalesce(
|
tag_bindings = coalesce(
|
||||||
var.data_overrides.tag_bindings,
|
var.data_overrides.tag_bindings,
|
||||||
|
|||||||
Reference in New Issue
Block a user