cloud-foundation-fabric/examples/data-solutions/dp-foundation/variables.tf

151 lines
3.9 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-01-17 23:58:14 -08:00
variable "composer_config" {
type = object({
ip_range_cloudsql = string
ip_range_gke_master = string
ip_range_web_server = string
region = string
secondary_ip_range = object({
pods = string
services = string
})
})
default = {
ip_range_cloudsql = "10.20.10.0/24"
ip_range_gke_master = "10.20.11.0/28"
ip_range_web_server = "10.20.11.16/28"
region = "europe-west1"
secondary_ip_range = {
pods = "10.10.8.0/22"
services = "10.10.12.0/24"
}
}
}
variable "data_force_destroy" {
description = "Flag to set 'force_destroy' on data services like biguqery or cloud storage."
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" {
description = "Shared VPC to use. If not null networks will be created in projects."
type = object({
network = string
vpc_subnet_range = object({
load = string
transformation = string
orchestration = string
})
})
default = {
network = null
vpc_subnet_range = {
load = "10.10.0.0/24"
transformation = "10.10.0.0/24"
orchestration = "10.10.0.0/24"
}
}
}
variable "organization" {
description = "Organization details."
type = object({
domain = string
})
}
variable "prefix" {
description = "Unique prefix used for resource names. Not used for project if 'project_create' is null."
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
}
variable "project_id" {
description = "Project id, references existing project if `project_create` is null."
type = object({
landing = string
load = string
orchestration = string
trasformation = string
datalake = string
2022-01-21 09:40:11 -08:00
security = string
2022-01-17 23:58:14 -08:00
})
default = {
landing = "lnd"
load = "lod"
orchestration = "orc"
trasformation = "trf"
datalake = "dtl"
2022-01-21 09:40:11 -08:00
security = "sec"
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
}