|
|
|
|
@@ -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
|
|
|
|
|
@@ -541,7 +551,7 @@ module "project" {
|
|
|
|
|
org_policies = "configs/org-policies/"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
# tftest modules=1 resources=8 files=boolean,list inventory=org-policies.yaml e2e
|
|
|
|
|
# tftest modules=1 resources=9 files=boolean,list inventory=org-policies.yaml e2e
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
|
@@ -563,7 +573,11 @@ iam.disableServiceAccountKeyUpload:
|
|
|
|
|
title: condition
|
|
|
|
|
enforce: true
|
|
|
|
|
- enforce: false
|
|
|
|
|
|
|
|
|
|
essentialcontacts.managed.allowedContactDomains:
|
|
|
|
|
rules:
|
|
|
|
|
- enforce: true
|
|
|
|
|
parameters: |
|
|
|
|
|
{"allowedDomains": ["@example.com"]}
|
|
|
|
|
# tftest-file id=boolean path=configs/org-policies/boolean.yaml schema=org-policies.schema.json
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
@@ -583,7 +597,6 @@ iam.allowedPolicyMemberDomains:
|
|
|
|
|
values:
|
|
|
|
|
- C0xxxxxxx
|
|
|
|
|
- C0yyyyyyy
|
|
|
|
|
|
|
|
|
|
# tftest-file id=list path=configs/org-policies/list.yaml schema=org-policies.schema.json
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
@@ -791,7 +804,7 @@ module "kms" {
|
|
|
|
|
project_id = var.project_id # KMS is in different project to prevent dependency cycle
|
|
|
|
|
keyring = {
|
|
|
|
|
location = var.region
|
|
|
|
|
name = "keyring"
|
|
|
|
|
name = "${var.prefix}-keyring"
|
|
|
|
|
}
|
|
|
|
|
keys = {
|
|
|
|
|
"key-regional" = {
|
|
|
|
|
@@ -1349,7 +1362,7 @@ module "kms" {
|
|
|
|
|
project_id = var.project_id # Keys come from different project to prevent dependency cycle
|
|
|
|
|
keyring = {
|
|
|
|
|
location = "global"
|
|
|
|
|
name = "keyring"
|
|
|
|
|
name = "${var.prefix}-keyring"
|
|
|
|
|
}
|
|
|
|
|
keys = {
|
|
|
|
|
"key-global" = {
|
|
|
|
|
@@ -1607,22 +1620,22 @@ alerts:
|
|
|
|
|
| [metric_scopes](variables-observability.tf#L216) | List of projects that will act as metric scopes for this project. | <code>list(string)</code> | | <code>[]</code> |
|
|
|
|
|
| [network_tags](variables-tags.tf#L17) | Network tags by key name. If `id` is provided, key creation is skipped. The `iam` attribute behaves like the similarly named one at module level. | <code title="map(object({ description = optional(string, "Managed by the Terraform project module.") iam = optional(map(list(string)), {}) iam_bindings = optional(map(object({ members = list(string) role = string condition = optional(object({ expression = string title = string description = optional(string) })) })), {}) iam_bindings_additive = optional(map(object({ member = string role = string condition = optional(object({ expression = string title = string description = optional(string) })) })), {}) id = optional(string) network = string # project_id/vpc_name values = optional(map(object({ description = optional(string, "Managed by the Terraform project module.") iam = optional(map(list(string)), {}) iam_bindings = optional(map(object({ members = list(string) role = string condition = optional(object({ expression = string title = string description = optional(string) })) })), {}) iam_bindings_additive = optional(map(object({ member = string role = string condition = optional(object({ expression = string title = string description = optional(string) })) })), {}) })), {}) }))">map(object({…}))</code> | | <code>{}</code> |
|
|
|
|
|
| [notification_channels](variables-observability.tf#L223) | Monitoring notification channels. | <code title="map(object({ type = string description = optional(string) display_name = optional(string) enabled = optional(bool) labels = optional(map(string)) user_labels = optional(map(string)) sensitive_labels = optional(object({ auth_token = optional(string) password = optional(string) service_key = optional(string) })) }))">map(object({…}))</code> | | <code>{}</code> |
|
|
|
|
|
| [org_policies](variables.tf#L114) | Organization policies applied to this project keyed by policy name. | <code title="map(object({ inherit_from_parent = optional(bool) # for list policies only. reset = optional(bool) rules = optional(list(object({ allow = optional(object({ all = optional(bool) values = optional(list(string)) })) deny = optional(object({ all = optional(bool) values = optional(list(string)) })) enforce = optional(bool) # for boolean policies only. condition = optional(object({ description = optional(string) expression = optional(string) location = optional(string) title = optional(string) }), {}) })), []) }))">map(object({…}))</code> | | <code>{}</code> |
|
|
|
|
|
| [parent](variables.tf#L141) | Parent folder or organization in 'folders/folder_id' or 'organizations/org_id' format. | <code>string</code> | | <code>null</code> |
|
|
|
|
|
| [prefix](variables.tf#L151) | Optional prefix used to generate project id and name. | <code>string</code> | | <code>null</code> |
|
|
|
|
|
| [project_create](variables.tf#L161) | Create project. When set to false, uses a data source to reference existing project. | <code>bool</code> | | <code>true</code> |
|
|
|
|
|
| [org_policies](variables.tf#L114) | Organization policies applied to this project keyed by policy name. | <code title="map(object({ inherit_from_parent = optional(bool) # for list policies only. reset = optional(bool) rules = optional(list(object({ allow = optional(object({ all = optional(bool) values = optional(list(string)) })) deny = optional(object({ all = optional(bool) values = optional(list(string)) })) enforce = optional(bool) # for boolean policies only. condition = optional(object({ description = optional(string) expression = optional(string) location = optional(string) title = optional(string) }), {}) parameters = optional(string) })), []) }))">map(object({…}))</code> | | <code>{}</code> |
|
|
|
|
|
| [parent](variables.tf#L142) | Parent folder or organization in 'folders/folder_id' or 'organizations/org_id' format. | <code>string</code> | | <code>null</code> |
|
|
|
|
|
| [prefix](variables.tf#L152) | Optional prefix used to generate project id and name. | <code>string</code> | | <code>null</code> |
|
|
|
|
|
| [project_create](variables.tf#L162) | Create project. When set to false, uses a data source to reference existing project. | <code>bool</code> | | <code>true</code> |
|
|
|
|
|
| [quotas](variables-quotas.tf#L17) | Service quota configuration. | <code title="map(object({ service = string quota_id = string preferred_value = number dimensions = optional(map(string), {}) justification = optional(string) contact_email = optional(string) annotations = optional(map(string)) ignore_safety_checks = optional(string) }))">map(object({…}))</code> | | <code>{}</code> |
|
|
|
|
|
| [service_agents_config](variables.tf#L167) | Automatic service agent configuration options. | <code title="object({ create_primary_agents = optional(bool, true) grant_default_roles = optional(bool, true) services_enabled = optional(list(string), []) })">object({…})</code> | | <code>{}</code> |
|
|
|
|
|
| [service_config](variables.tf#L178) | Configure service API activation. | <code title="object({ disable_on_destroy = bool disable_dependent_services = bool })">object({…})</code> | | <code title="{ disable_on_destroy = false disable_dependent_services = false }">{…}</code> |
|
|
|
|
|
| [service_encryption_key_ids](variables.tf#L190) | Service Agents to be granted encryption/decryption permissions over Cloud KMS encryption keys. Format {SERVICE_AGENT => [KEY_ID]}. | <code>map(list(string))</code> | | <code>{}</code> |
|
|
|
|
|
| [services](variables.tf#L197) | Service APIs to enable. | <code>list(string)</code> | | <code>[]</code> |
|
|
|
|
|
| [shared_vpc_host_config](variables.tf#L203) | Configures this project as a Shared VPC host project (mutually exclusive with shared_vpc_service_project). | <code title="object({ enabled = bool service_projects = optional(list(string), []) })">object({…})</code> | | <code>null</code> |
|
|
|
|
|
| [shared_vpc_service_config](variables.tf#L212) | Configures this project as a Shared VPC service project (mutually exclusive with shared_vpc_host_config). | <code title="object({ host_project = string network_users = optional(list(string), []) service_agent_iam = optional(map(list(string)), {}) service_agent_subnet_iam = optional(map(list(string)), {}) service_iam_grants = optional(list(string), []) network_subnet_users = optional(map(list(string)), {}) })">object({…})</code> | | <code title="{ host_project = null }">{…}</code> |
|
|
|
|
|
| [skip_delete](variables.tf#L240) | Deprecated. Use deletion_policy. | <code>bool</code> | | <code>null</code> |
|
|
|
|
|
| [service_agents_config](variables.tf#L168) | Automatic service agent configuration options. | <code title="object({ create_primary_agents = optional(bool, true) grant_default_roles = optional(bool, true) services_enabled = optional(list(string), []) })">object({…})</code> | | <code>{}</code> |
|
|
|
|
|
| [service_config](variables.tf#L179) | Configure service API activation. | <code title="object({ disable_on_destroy = bool disable_dependent_services = bool })">object({…})</code> | | <code title="{ disable_on_destroy = false disable_dependent_services = false }">{…}</code> |
|
|
|
|
|
| [service_encryption_key_ids](variables.tf#L191) | Service Agents to be granted encryption/decryption permissions over Cloud KMS encryption keys. Format {SERVICE_AGENT => [KEY_ID]}. | <code>map(list(string))</code> | | <code>{}</code> |
|
|
|
|
|
| [services](variables.tf#L198) | Service APIs to enable. | <code>list(string)</code> | | <code>[]</code> |
|
|
|
|
|
| [shared_vpc_host_config](variables.tf#L204) | Configures this project as a Shared VPC host project (mutually exclusive with shared_vpc_service_project). | <code title="object({ enabled = bool service_projects = optional(list(string), []) })">object({…})</code> | | <code>null</code> |
|
|
|
|
|
| [shared_vpc_service_config](variables.tf#L213) | Configures this project as a Shared VPC service project (mutually exclusive with shared_vpc_host_config). | <code title="object({ host_project = string network_users = optional(list(string), []) service_agent_iam = optional(map(list(string)), {}) service_agent_subnet_iam = optional(map(list(string)), {}) service_iam_grants = optional(list(string), []) network_subnet_users = optional(map(list(string)), {}) })">object({…})</code> | | <code title="{ host_project = null }">{…}</code> |
|
|
|
|
|
| [skip_delete](variables.tf#L241) | Deprecated. Use deletion_policy. | <code>bool</code> | | <code>null</code> |
|
|
|
|
|
| [tag_bindings](variables-tags.tf#L81) | Tag bindings for this project, in key => tag value id format. | <code>map(string)</code> | | <code>null</code> |
|
|
|
|
|
| [tags](variables-tags.tf#L88) | Tags by key name. If `id` is provided, key or value creation is skipped. The `iam` attribute behaves like the similarly named one at module level. | <code title="map(object({ description = optional(string, "Managed by the Terraform project module.") iam = optional(map(list(string)), {}) iam_bindings = optional(map(object({ members = list(string) role = string condition = optional(object({ expression = string title = string description = optional(string) })) })), {}) iam_bindings_additive = optional(map(object({ member = string role = string condition = optional(object({ expression = string title = string description = optional(string) })) })), {}) id = optional(string) values = optional(map(object({ description = optional(string, "Managed by the Terraform project module.") iam = optional(map(list(string)), {}) iam_bindings = optional(map(object({ members = list(string) role = string condition = optional(object({ expression = string title = string description = optional(string) })) })), {}) iam_bindings_additive = optional(map(object({ member = string role = string condition = optional(object({ expression = string title = string description = optional(string) })) })), {}) id = optional(string) })), {}) }))">map(object({…}))</code> | | <code>{}</code> |
|
|
|
|
|
| [universe](variables.tf#L252) | GCP universe where to deploy the project. The prefix will be prepended to the project id. | <code title="object({ prefix = string unavailable_services = optional(list(string), []) })">object({…})</code> | | <code>null</code> |
|
|
|
|
|
| [vpc_sc](variables.tf#L261) | VPC-SC configuration for the project, use when `ignore_changes` for resources is set in the VPC-SC module. | <code title="object({ perimeter_name = string perimeter_bridges = optional(list(string), []) is_dry_run = optional(bool, false) })">object({…})</code> | | <code>null</code> |
|
|
|
|
|
| [universe](variables.tf#L253) | GCP universe where to deploy the project. The prefix will be prepended to the project id. | <code title="object({ prefix = string unavailable_services = optional(list(string), []) })">object({…})</code> | | <code>null</code> |
|
|
|
|
|
| [vpc_sc](variables.tf#L262) | VPC-SC configuration for the project, use when `ignore_changes` for resources is set in the VPC-SC module. | <code title="object({ perimeter_name = string perimeter_bridges = optional(list(string), []) is_dry_run = optional(bool, false) })">object({…})</code> | | <code>null</code> |
|
|
|
|
|
|
|
|
|
|
## Outputs
|
|
|
|
|
|
|
|
|
|
|