-
Notifications
You must be signed in to change notification settings - Fork 0
/
locals-projects-configuration.tf
46 lines (40 loc) · 1.16 KB
/
locals-projects-configuration.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
locals {
// Define a map of default projects with their associated APIs and roles
default_projects = {
"platform" = {
// List of extra APIs to be enabled for the project
extra_apis = [
"artifactregistry.googleapis.com",
]
// List of extra roles to be assigned to the service account for the project
extra_roles = [
"roles/artifactregistry.admin",
]
}
"bodleian" = {
extra_apis = [
"run.googleapis.com",
]
extra_roles = [
"roles/storage.admin",
"roles/monitoring.admin",
]
}
"terraform-examples" = {
extra_apis = [
"billingbudgets.googleapis.com",
"cloudasset.googleapis.com",
"compute.googleapis.com",
"iap.googleapis.com",
"networkmanagement.googleapis.com",
"run.googleapis.com",
]
extra_roles = [
"roles/storage.admin",
"roles/monitoring.admin",
]
}
}
// If no project configuration is provided, use the default projects. Otherwise, use the provided configuration.
projects = length(var.projects_config) == 0 ? local.default_projects : var.projects_config
}