Update examples and tests

This commit is contained in:
Julio Castillo
2025-02-06 16:04:23 +00:00
committed by Julio Castillo
parent e4a1218d46
commit 3fc7144c4f
5 changed files with 30 additions and 7 deletions

View File

@@ -139,9 +139,19 @@ module "folder" {
"compute.vmExternalIpAccess" = {
rules = [{ deny = { all = true } }]
}
"essentialcontacts.managed.allowedContactDomains" = {
rules = [
{
enforce = true
parameters = jsonencode({
allowedDomains = ["@example.com"]
})
}
]
}
}
}
# tftest modules=1 resources=8 inventory=org-policies.yaml e2e
# tftest modules=1 resources=9 inventory=org-policies.yaml e2e
```
### Organization Policy Factory

View File

@@ -46,6 +46,9 @@
"type": "string"
}
}
},
"parameters": {
"type": "string"
}
}
}
@@ -70,4 +73,4 @@
}
}
}
}
}

View File

@@ -517,9 +517,19 @@ module "project" {
"compute.vmExternalIpAccess" = {
rules = [{ deny = { all = true } }]
}
"essentialcontacts.managed.allowedContactDomains" = {
rules = [
{
enforce = true
parameters = jsonencode({
allowedDomains = ["@example.com"]
})
}
]
}
}
}
# tftest modules=1 resources=8 inventory=org-policies.yaml e2e
# tftest modules=1 resources=9 inventory=org-policies.yaml e2e
```
### Organization Policy Factory

View File

@@ -1,4 +1,4 @@
# Copyright 2023 Google LLC
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -105,4 +105,4 @@ values:
counts:
google_folder: 1
google_org_policy_policy: 7
google_org_policy_policy: 8

View File

@@ -1,4 +1,4 @@
# Copyright 2023 Google LLC
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -121,5 +121,5 @@ values:
project_id: test-project
counts:
google_org_policy_policy: 7
google_org_policy_policy: 8
google_project: 1