-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
208 lines (178 loc) · 5.81 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
208
/**
* Copyright 2020 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 "parent_folder" {
description = "GCP parent folder ID in the form folders/{id}"
default = ""
type = string
}
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 "group_billing_admins" {
description = "Google Group for GCP Billing Administrators"
type = string
}
variable "default_region" {
description = "Default region to create resources where applicable."
type = string
default = "us-central1"
}
/******************************************
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."
default = "cft"
type = string
}
variable "project_id" {
description = "Custom project ID to use for project created. If not supplied, the default id is {project_prefix}-seed-{random suffix}."
default = ""
type = string
}
variable "activate_apis" {
description = "List of APIs to enable in the seed 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",
"monitoring.googleapis.com"
]
}
variable "sa_org_iam_permissions" {
description = "List of permissions granted to Terraform service account across the GCP organization."
type = list(string)
default = [
"roles/billing.user",
"roles/compute.networkAdmin",
"roles/compute.xpnAdmin",
"roles/iam.securityAdmin",
"roles/iam.serviceAccountAdmin",
"roles/logging.configWriter",
"roles/orgpolicy.policyAdmin",
"roles/resourcemanager.folderAdmin",
"roles/resourcemanager.organizationViewer",
]
}
variable "sa_enable_impersonation" {
description = "Allow org_admins group to impersonate service account & enable APIs required."
type = bool
default = false
}
variable "create_terraform_sa" {
description = "If the Terraform service account should be created."
type = bool
default = true
}
variable "state_bucket_name" {
description = "Custom state bucket name. If not supplied, the default name is {project_prefix}-tfstate-{random suffix}."
default = ""
type = string
}
variable "grant_billing_user" {
description = "Grant roles/billing.user role to CFT service account"
type = bool
default = true
}
variable "storage_bucket_labels" {
description = "Labels to apply to the storage bucket."
type = map(string)
default = {}
}
variable "force_destroy" {
description = "If supplied, the state bucket will be deleted even while containing objects."
type = bool
default = false
}
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 "folder_id" {
description = "The ID of a folder to host this project"
type = string
default = ""
}
variable "org_project_creators" {
description = "Additional list of members to have project creator role accross the organization. Prefix of group: user: or serviceAccount: is required."
type = list(string)
default = []
}
variable "random_suffix" {
description = "Appends a 4 character random suffix to project ID and GCS bucket name."
type = bool
default = true
}
variable "tf_service_account_id" {
description = "ID of service account for terraform in seed project"
type = string
default = "org-terraform"
}
variable "tf_service_account_name" {
description = "Display name of service account for terraform in seed project"
type = string
default = "CFT Organization Terraform Account"
}
variable "encrypt_gcs_bucket_tfstate" {
description = "Encrypt bucket used for storing terraform state files in seed project."
type = bool
default = false
}
variable "key_protection_level" {
type = string
description = "The protection level to use when creating a version based on this template. Default value: \"SOFTWARE\" Possible values: [\"SOFTWARE\", \"HSM\"]"
default = "SOFTWARE"
}
variable "key_rotation_period" {
description = "The rotation period of the key."
type = string
default = null
}
variable "kms_prevent_destroy" {
description = "Set the prevent_destroy lifecycle attribute on keys."
type = bool
default = true
}