-
Notifications
You must be signed in to change notification settings - Fork 1
/
locals.tf
16 lines (13 loc) · 715 Bytes
/
locals.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
locals {
# for a clean translation when using terragrunt
deployment_project = var.project
# selecting scope_id dependent on provided scope_type
project_scope_id = var.scope_type == "projects" ? var.acting_project : ""
folder_scope_id = var.scope_type == "folders" ? var.acting_folder : ""
org_scope_id = var.scope_type == "organizations" ? var.acting_organization : ""
scope_id = coalesce(local.project_scope_id, local.folder_scope_id, local.org_scope_id)
# Roles required to view assets and to apply changes to iam configuration.
app_roles = ["roles/iam.securityAdmin", "roles/cloudasset.viewer"]
# random id requires a list of urls
managed_domains = tolist([var.dns_name])
}