-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvariables.tf
196 lines (166 loc) · 4.71 KB
/
variables.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# -----------------------------
# PROJECT
# -----------------------------
variable "project_prefix" {
description = "Name prefix to use for projects created."
type = string
default = "automation"
}
variable "random_project_id" {
description = "Adds a suffix of 4 random characters to the `project_id`"
type = string
default = true
}
variable "disable_services_on_destroy" {
description = "Whether project services will be disabled when the resources are destroyed"
type = string
default = true
}
variable "activate_apis" {
description = "List of APIs to enable in the seed project"
type = list(string)
default = ["cloudresourcemanager.googleapis.com",
"cloudbilling.googleapis.com",
"billingbudgets.googleapis.com",
"iam.googleapis.com",
"admin.googleapis.com",
"cloudbuild.googleapis.com",
"serviceusage.googleapis.com",
"servicenetworking.googleapis.com",
"compute.googleapis.com",
"logging.googleapis.com",
"bigquery.googleapis.com",
"storage-api.googleapis.com",
"container.googleapis.com"
]
}
variable "project_labels" {
description = "Labels to apply to the project."
type = map(string)
default = {
envrionment = "prod"
owner = "its"
billing_code = "012345"
}
}
variable "sa_enable_impersonation" {
description = "Allow org_admins group to impersonate service account & enable APIs required."
type = bool
default = false
}
variable "skip_gcloud_download" {
description = "Whether to skip downloading gcloud (assumes gcloud is already available outside the module)"
type = bool
default = true
}
# -----------------------------
# FOLDER
# -----------------------------
variable "seed_folder_name" {
description = "Name of the folder that will contain the `Cloud Control Plane` projects."
type = string
default = "Administration"
}
variable "parent_folder" {
description = "Optional - if using a folder for testing."
type = string
default = ""
}
# -----------------------------
# IAM
# -----------------------------
variable "org_admins_org_iam_permissions" {
description = "List of permissions granted to the group supplied in group_org_admins variable across the GCP organization."
type = list(string)
default = [
"roles/billing.user",
"roles/resourcemanager.organizationAdmin"
]
}
variable "cloudbuild_org_iam_permissions" {
description = "List of permissions granted to the CloudBuild service account."
type = list(string)
default = [
"roles/resourcemanager.organizationAdmin",
"roles/billing.user",
"roles/pubsub.admin",
"roles/iam.organizationRoleAdmin",
"roles/resourcemanager.folderAdmin",
"roles/orgpolicy.policyAdmin",
"roles/resourcemanager.projectCreator",
"roles/compute.xpnAdmin",
"roles/compute.networkAdmin",
"roles/iam.serviceAccountAdmin",
"roles/resourcemanager.projectIamAdmin",
"roles/storage.admin",
"roles/logging.admin"
]
}
# -----------------------------
# BUCKET
# -----------------------------
variable "storage_bucket_labels" {
description = "Labels to apply to the storage bucket."
type = map(string)
default = {}
}
# -----------------------------
# REPOS AND TRIGGERS
# -----------------------------
variable "github_owner" {
description = "Owner of the repository."
type = string
}
variable "github_name" {
description = "Name of the repository."
type = string
}
variable "branch" {
description = "What branch to pull from"
type = string
default = "^master$"
}
variable "cloud_triggers" {
description = "Name of triggers to deploy"
type = list(string)
default = [
"1-org",
"1-org-b",
"2-networks",
]
}
variable "disable_trigger" {
description = "To enable or disable the trigger for automatic deployment"
type = string
default = false
}
variable "terraform_tag" {
description = "Dockerhub tag value for Terraform container"
default = "latest"
}
variable "filename_path" {
description = "The file path name of where the cloudbuild yaml files are located"
default = "cloudbuild"
}
variable "deployment_dir" {
description = "The directory that has the deployments / tfvars"
type = string
default = "projects"
}
variable "modules_dir" {
description = "The directory that has the modules to deploy"
type = string
default = "project_iam_vpc"
}
variable "cloudops_triggers" {
description = "Name of triggers to deploy"
type = list(string)
default = [
"project-apply",
]
}
variable "tfvars_name" {
description = "Name of the tfvars file"
type = string
default = "new-project"
}