cloud-foundation-fabric/examples/data-solutions/data-platform-foundations/variables.tf

158 lines
4.2 KiB
Terraform
Raw Normal View History

2022-01-17 23:58:14 -08:00
# Copyright 2022 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
#
# https://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.
2022-02-01 00:09:53 -08:00
# tfdoc:file:description Terraform Variables.
2022-01-31 21:41:33 -08:00
2022-02-07 08:51:06 -08:00
2022-01-17 23:58:14 -08:00
variable "composer_config" {
type = object({
2022-02-07 08:51:06 -08:00
node_count = number
airflow_version = string
2022-02-07 12:28:54 -08:00
env_variables = map(string)
2022-02-07 08:51:06 -08:00
})
default = {
node_count = 3
2022-02-07 12:28:54 -08:00
airflow_version = "composer-1.17.5-airflow-2.1.4"
env_variables = {}
2022-01-17 23:58:14 -08:00
}
}
variable "data_force_destroy" {
2022-02-02 00:48:03 -08:00
description = "Flag to set 'force_destroy' on data services like BiguQery or Cloud Storage."
2022-01-17 23:58:14 -08:00
type = bool
default = false
}
variable "groups" {
description = "Groups."
type = map(string)
default = {
data-analysts = "gcp-data-analysts"
data-engineers = "gcp-data-engineers"
data-security = "gcp-data-security"
2022-01-17 23:58:14 -08:00
}
}
variable "network_config" {
2022-02-07 12:28:54 -08:00
description = "Shared VPC network configurations to use. If null networks will be created in projects with preconfigured values."
2022-01-17 23:58:14 -08:00
type = object({
2022-02-07 08:51:06 -08:00
network_self_link = string
subnet_self_links = object({
2022-02-03 05:25:46 -08:00
load = string
transformation = string
orchestration = string
})
2022-02-07 08:51:06 -08:00
composer_ip_ranges = object({
cloudsql = string
gke_master = string
web_server = string
})
composer_secondary_ranges = object({
pods = string
services = string
})
2022-01-17 23:58:14 -08:00
})
2022-02-07 08:51:06 -08:00
2022-02-07 12:28:54 -08:00
default = {
network_self_link = null
subnet_self_links = null
composer_ip_ranges = null
composer_secondary_ranges = null
2022-01-17 23:58:14 -08:00
}
}
variable "organization" {
description = "Organization details."
type = object({
domain = string
})
}
variable "prefix" {
2022-02-02 00:48:03 -08:00
description = "Unique prefix used for resource names. Not used for projects if 'project_create' is null."
2022-01-17 23:58:14 -08:00
type = string
}
variable "project_create" {
2022-01-31 09:58:55 -08:00
description = "Provide values if project creation is needed, uses existing project if null. Parent is in 'folders/nnn' or 'organizations/nnn' format."
2022-01-17 23:58:14 -08:00
type = object({
billing_account_id = string
parent = string
})
default = null
}
2022-02-08 08:46:34 -08:00
variable "project_ids" {
2022-01-17 23:58:14 -08:00
description = "Project id, references existing project if `project_create` is null."
type = object({
2022-02-02 06:31:54 -08:00
landing = string
load = string
orchestration = string
trasformation = string
datalake-l0 = string
datalake-l1 = string
datalake-l2 = string
datalake-playground = string
common = string
exposure = string
2022-01-17 23:58:14 -08:00
})
default = {
2022-02-02 06:31:54 -08:00
landing = "lnd"
load = "lod"
orchestration = "orc"
trasformation = "trf"
datalake-l0 = "dtl-0"
datalake-l1 = "dtl-1"
datalake-l2 = "dtl-2"
datalake-playground = "dtl-plg"
common = "cmn"
exposure = "exp"
2022-01-17 23:58:14 -08:00
}
}
variable "project_services" {
2022-01-31 09:58:55 -08:00
description = "List of core services enabled on all projects."
type = list(string)
2022-01-17 23:58:14 -08:00
default = [
"cloudresourcemanager.googleapis.com",
"iam.googleapis.com",
"serviceusage.googleapis.com",
"stackdriver.googleapis.com"
]
}
variable "location_config" {
description = "Locations where resources will be deployed. Map to configure region and multiregion specs."
type = object({
region = string
multi_region = string
})
default = {
region = "europe-west1"
multi_region = "eu"
}
}
variable "service_encryption_keys" { # service encription key
description = "Cloud KMS to use to encrypt different services. Key location should match service region."
type = object({
bq = string
composer = string
dataflow = string
storage = string
pubsub = string
})
default = null
2022-01-17 23:58:14 -08:00
}