-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
279 lines (236 loc) · 11.2 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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
/**
* 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.
*/
variable "labels" {
description = "(Optional) Labels attached to Data Warehouse resources."
type = map(string)
default = {}
}
variable "remove_owner_role" {
description = "(Optional) If set to true, remove all owner roles in all projects in case it has been found in some project."
type = bool
default = false
}
variable "trusted_locations" {
description = "This is a list of trusted regions where location-based GCP resources can be created."
type = list(string)
default = ["us-locations"]
}
variable "trusted_subnetworks" {
description = "The URI of the subnetworks where resources are going to be deployed."
type = list(string)
default = []
}
variable "org_id" {
description = "GCP Organization ID."
type = string
}
variable "pubsub_resource_location" {
description = "The location in which the messages published to Pub/Sub will be persisted. This location cannot be a multi-region."
type = string
default = "us-east4"
}
variable "location" {
description = "The location for the KMS Customer Managed Encryption Keys, Cloud Storage Buckets, and Bigquery datasets. This location can be a multi-region."
type = string
default = "us-east4"
}
variable "terraform_service_account" {
description = "The email address of the service account that will run the Terraform code."
type = string
}
variable "data_ingestion_project_id" {
description = "The ID of the project in which the data ingestion resources will be created"
type = string
}
variable "data_governance_project_id" {
description = "The ID of the project in which the data governance resources will be created."
type = string
}
variable "non_confidential_data_project_id" {
description = "The ID of the project in which the Bigquery will be created."
type = string
}
variable "confidential_data_project_id" {
description = "Project where the confidential datasets and tables are created."
type = string
}
variable "sdx_project_number" {
description = "The Project Number to configure Secure data exchange with egress rule for dataflow templates. Required if using a dataflow job template from a private storage bucket outside of the perimeter."
type = string
default = ""
}
variable "access_context_manager_policy_id" {
description = "The id of the default Access Context Manager policy. Can be obtained by running `gcloud access-context-manager policies list --organization YOUR-ORGANIZATION_ID --format=\"value(name)\"`."
type = string
default = ""
}
variable "perimeter_additional_members" {
description = "The list additional members to be added on perimeter access. Prefix user: (user:[email protected]) or serviceAccount: (serviceAccount:[email protected]) is required."
type = list(string)
default = []
}
variable "bucket_name" {
description = "The name of the bucket being provisioned."
type = string
validation {
condition = length(var.bucket_name) < 20
error_message = "The bucket_name must contain less than 20 characters. This ensures the name can be prefixed with the project-id and suffixed with 8 random characters."
}
}
variable "bucket_class" {
description = "The storage class for the bucket being provisioned."
type = string
default = "STANDARD"
}
variable "bucket_lifecycle_rules" {
description = "List of lifecycle rules to configure. Format is the same as described in provider documentation https://www.terraform.io/docs/providers/google/r/storage_bucket.html#lifecycle_rule except condition.matches_storage_class should be a comma delimited string."
type = set(object({
action = any
condition = any
}))
default = [{
action = {
type = "Delete"
}
condition = {
age = 30
with_state = "ANY"
matches_storage_class = ["STANDARD"]
}
}]
}
variable "confidential_dataset_id" {
description = "Unique ID for the confidential dataset being provisioned."
type = string
default = "secured_dataset"
}
variable "dataset_id" {
description = "Unique ID for the dataset being provisioned."
type = string
}
variable "dataset_name" {
description = "Friendly name for the dataset being provisioned."
type = string
default = "Data-ingestion dataset"
}
variable "dataset_description" {
description = "Dataset description."
type = string
default = "Data-ingestion dataset"
}
variable "dataset_default_table_expiration_ms" {
description = "TTL of tables using the dataset in MS. The default value is null."
type = number
default = null
}
variable "cmek_keyring_name" {
description = "The Keyring prefix name for the KMS Customer Managed Encryption Keys being provisioned."
type = string
}
variable "key_rotation_period_seconds" {
description = "Rotation period for keys. The default value is 30 days."
type = string
default = "2592000s"
}
variable "delete_contents_on_destroy" {
description = "(Optional) If set to true, delete all the tables in the dataset when destroying the resource; otherwise, destroying the resource will fail if tables are present."
type = bool
default = false
}
variable "data_ingestion_dataflow_deployer_identities" {
description = "List of members in the standard GCP form: user:{email}, serviceAccount:{email} that will deploy Dataflow jobs in the Data Ingestion project. These identities will be added to the VPC-SC secure data exchange egress rules."
type = list(string)
default = []
}
variable "confidential_data_dataflow_deployer_identities" {
description = "List of members in the standard GCP form: user:{email}, serviceAccount:{email} that will deploy Dataflow jobs in the Confidential Data project. These identities will be added to the VPC-SC secure data exchange egress rules."
type = list(string)
default = []
}
variable "kms_key_protection_level" {
description = "The protection level to use when creating a key. Possible values: [\"SOFTWARE\", \"HSM\"]"
type = string
default = "HSM"
}
variable "security_administrator_group" {
description = "Google Cloud IAM group that administers security configurations in the organization(org policies, KMS, VPC service perimeter)."
type = string
}
variable "network_administrator_group" {
description = "Google Cloud IAM group that reviews network configuration. Typically, this includes members of the networking team."
type = string
}
variable "security_analyst_group" {
description = "Google Cloud IAM group that monitors and responds to security incidents."
type = string
}
variable "data_analyst_group" {
description = "Google Cloud IAM group that analyzes the data in the warehouse."
type = string
}
variable "data_engineer_group" {
description = "Google Cloud IAM group that sets up and maintains the data pipeline and warehouse."
type = string
}
variable "data_ingestion_egress_policies" {
description = "A list of all [egress policies](https://cloud.google.com/vpc-service-controls/docs/ingress-egress-rules#egress-rules-reference) for the Data Ingestion perimeter, each list object has a `from` and `to` value that describes egress_from and egress_to. See also [secure data exchange](https://cloud.google.com/vpc-service-controls/docs/secure-data-exchange#allow_access_to_a_google_cloud_resource_outside_the_perimeter) and the [VPC-SC](https://github.com/terraform-google-modules/terraform-google-vpc-service-controls/blob/v3.1.0/modules/regular_service_perimeter/README.md) module."
type = list(object({
from = any
to = any
}))
default = []
}
variable "data_governance_egress_policies" {
description = "A list of all [egress policies](https://cloud.google.com/vpc-service-controls/docs/ingress-egress-rules#egress-rules-reference) for the Data Governance perimeter, each list object has a `from` and `to` value that describes egress_from and egress_to. See also [secure data exchange](https://cloud.google.com/vpc-service-controls/docs/secure-data-exchange#allow_access_to_a_google_cloud_resource_outside_the_perimeter) and the [VPC-SC](https://github.com/terraform-google-modules/terraform-google-vpc-service-controls/blob/v3.1.0/modules/regular_service_perimeter/README.md) module."
type = list(object({
from = any
to = any
}))
default = []
}
variable "confidential_data_egress_policies" {
description = "A list of all [egress policies](https://cloud.google.com/vpc-service-controls/docs/ingress-egress-rules#egress-rules-reference) for the Confidential Data perimeter, each list object has a `from` and `to` value that describes egress_from and egress_to. See also [secure data exchange](https://cloud.google.com/vpc-service-controls/docs/secure-data-exchange#allow_access_to_a_google_cloud_resource_outside_the_perimeter) and the [VPC-SC](https://github.com/terraform-google-modules/terraform-google-vpc-service-controls/blob/v3.1.0/modules/regular_service_perimeter/README.md) module."
type = list(object({
from = any
to = any
}))
default = []
}
variable "additional_restricted_services" {
description = "The list of additional Google services to be protected by the VPC-SC service perimeters."
type = list(string)
default = []
}
variable "data_ingestion_perimeter" {
description = "Existing data ingestion perimeter to be used instead of the auto-created perimeter. The service account provided in the variable `terraform_service_account` must be in an access level member list for this perimeter **before** this perimeter can be used in this module."
type = string
default = ""
}
variable "data_governance_perimeter" {
description = "Existing data governance perimeter to be used instead of the auto-created perimeter. The service account provided in the variable `terraform_service_account` must be in an access level member list for this perimeter **before** this perimeter can be used in this module."
type = string
default = ""
}
variable "confidential_data_perimeter" {
description = "Existing confidential data perimeter to be used instead of the auto-created perimeter. The service account provided in the variable `terraform_service_account` must be in an access level member list for this perimeter **before** this perimeter can be used in this module."
type = string
default = ""
}
variable "enable_bigquery_read_roles_in_data_ingestion" {
description = "(Optional) If set to true, it will grant to the dataflow controller service account created in the data ingestion project the necessary roles to read from a bigquery table."
type = bool
default = false
}