-
Notifications
You must be signed in to change notification settings - Fork 148
/
variables.tf
207 lines (173 loc) · 5.34 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
197
198
199
200
201
202
203
204
205
206
207
/**
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/******************************************
Required variables
*******************************************/
variable "org_id" {
description = "GCP Organization ID"
type = string
}
variable "billing_account" {
description = "The ID of the billing account to associate projects with."
type = string
}
variable "group_org_admins" {
description = "Google Group for GCP Organization Administrators"
type = string
}
variable "default_region" {
description = "Default region to create resources where applicable."
type = string
default = "us-central1"
}
variable "terraform_sa_email" {
description = "Email for terraform service account."
type = string
}
variable "terraform_sa_name" {
description = "Fully-qualified name of the terraform service account."
type = string
}
variable "terraform_state_bucket" {
description = "Default state bucket, used in Cloud Build substitutions."
type = string
}
/******************************************
Optional variables
*******************************************/
variable "project_labels" {
description = "Labels to apply to the project."
type = map(string)
default = {}
}
variable "project_prefix" {
description = "Name prefix to use for projects created."
type = string
default = "cft"
}
variable "project_id" {
description = "Custom project ID to use for project created."
default = ""
type = string
}
variable "project_deletion_policy" {
description = "The deletion policy for the project created."
type = string
default = "PREVENT"
}
variable "project_auto_create_network" {
description = "Create the default network for the project created."
type = bool
default = false
}
variable "activate_apis" {
description = "List of APIs to enable in the Cloudbuild project."
type = list(string)
default = [
"serviceusage.googleapis.com",
"servicenetworking.googleapis.com",
"compute.googleapis.com",
"logging.googleapis.com",
"bigquery.googleapis.com",
"cloudresourcemanager.googleapis.com",
"cloudbilling.googleapis.com",
"iam.googleapis.com",
"admin.googleapis.com",
"appengine.googleapis.com",
"storage-api.googleapis.com"
]
}
variable "sa_enable_impersonation" {
description = "Allow org_admins group to impersonate service account & enable APIs required."
type = bool
default = false
}
variable "storage_bucket_labels" {
description = "Labels to apply to the storage bucket."
type = map(string)
default = {}
}
variable "force_destroy" {
description = "If supplied, the logs and artifacts buckets will be deleted even while containing objects."
type = bool
default = false
}
variable "create_cloud_source_repos" {
description = "If shared Cloud Source Repos should be created."
type = bool
default = true
}
variable "cloud_source_repos" {
description = "List of Cloud Source Repos to create with CloudBuild triggers."
type = list(string)
default = [
"gcp-org",
"gcp-networks",
"gcp-projects",
]
}
variable "folder_id" {
description = "The ID of a folder to host this project"
type = string
default = ""
}
variable "terraform_version" {
description = "Default terraform version."
type = string
default = "1.0.2"
}
variable "gcloud_version" {
description = "Default gcloud image version."
type = string
default = "388.0.0-slim"
}
variable "terraform_version_sha256sum" {
description = "sha256sum for default terraform version."
type = string
default = "7329f887cc5a5bda4bedaec59c439a4af7ea0465f83e3c1b0f4d04951e1181f4"
}
variable "cloudbuild_plan_filename" {
description = "Path and name of Cloud Build YAML definition used for terraform plan."
type = string
default = "cloudbuild-tf-plan.yaml"
}
variable "cloudbuild_apply_filename" {
description = "Path and name of Cloud Build YAML definition used for terraform apply."
type = string
default = "cloudbuild-tf-apply.yaml"
}
variable "terraform_apply_branches" {
description = "List of git branches configured to run terraform apply Cloud Build trigger. All other branches will run plan by default."
type = list(string)
default = [
"main"
]
}
variable "gar_repo_name" {
description = "Custom name to use for GAR repo."
default = ""
type = string
}
variable "random_suffix" {
description = "Appends a 4 character random suffix to project ID and GCS bucket name."
type = bool
default = true
}
variable "impersonate_service_account" {
description = "The service account to impersonate while running the gcloud builds submit command."
type = string
default = ""
}