2021-06-10 00:58:40 -07:00
|
|
|
# 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
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
|
|
|
variable "datamart_bq_datasets" {
|
|
|
|
description = "Datamart Bigquery datasets"
|
2021-06-10 08:04:27 -07:00
|
|
|
type = map(object({
|
|
|
|
iam = map(list(string))
|
|
|
|
location = string
|
|
|
|
}))
|
2021-06-10 00:58:40 -07:00
|
|
|
default = {
|
|
|
|
bq_datamart_dataset = {
|
|
|
|
location = "EU"
|
|
|
|
iam = {
|
2021-06-10 08:04:27 -07:00
|
|
|
# "roles/bigquery.dataOwner" = []
|
|
|
|
# "roles/bigquery.dataEditor" = []
|
|
|
|
# "roles/bigquery.dataViewer" = []
|
2021-06-10 00:58:40 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "dwh_bq_datasets" {
|
|
|
|
description = "DWH Bigquery datasets"
|
2021-06-10 08:04:27 -07:00
|
|
|
type = map(object({
|
|
|
|
location = string
|
|
|
|
iam = map(list(string))
|
|
|
|
}))
|
2021-06-10 00:58:40 -07:00
|
|
|
default = {
|
|
|
|
bq_raw_dataset = {
|
2021-06-10 08:04:27 -07:00
|
|
|
iam = {}
|
2021-06-10 00:58:40 -07:00
|
|
|
location = "EU"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "landing_buckets" {
|
|
|
|
description = "List of landing buckets to create"
|
2021-06-10 08:04:27 -07:00
|
|
|
type = map(object({
|
|
|
|
location = string
|
|
|
|
name = string
|
|
|
|
}))
|
2021-06-10 00:58:40 -07:00
|
|
|
default = {
|
|
|
|
raw-data = {
|
|
|
|
location = "EU"
|
2021-06-10 08:04:27 -07:00
|
|
|
name = "raw-data"
|
|
|
|
}
|
2021-06-10 00:58:40 -07:00
|
|
|
data-schema = {
|
|
|
|
location = "EU"
|
2021-06-10 08:04:27 -07:00
|
|
|
name = "data-schema"
|
|
|
|
}
|
2021-06-10 00:58:40 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "landing_pubsub" {
|
|
|
|
description = "List of landing pubsub topics and subscriptions to create"
|
2021-06-10 08:04:27 -07:00
|
|
|
type = map(map(object({
|
|
|
|
iam = map(list(string))
|
|
|
|
labels = map(string)
|
|
|
|
options = object({
|
|
|
|
ack_deadline_seconds = number
|
|
|
|
message_retention_duration = number
|
|
|
|
retain_acked_messages = bool
|
|
|
|
expiration_policy_ttl = number
|
|
|
|
})
|
|
|
|
})))
|
2021-06-10 00:58:40 -07:00
|
|
|
default = {
|
2021-06-10 08:04:27 -07:00
|
|
|
landing-1 = {
|
|
|
|
sub1 = {
|
|
|
|
iam = {
|
|
|
|
# "roles/pubsub.subscriber" = []
|
2021-06-10 00:58:40 -07:00
|
|
|
}
|
2021-06-10 08:04:27 -07:00
|
|
|
labels = {}
|
|
|
|
options = null
|
2021-06-10 00:58:40 -07:00
|
|
|
}
|
2021-06-10 08:04:27 -07:00
|
|
|
sub2 = {
|
|
|
|
iam = {}
|
|
|
|
labels = {},
|
|
|
|
options = null
|
|
|
|
},
|
2021-06-10 00:58:40 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "landing_service_account" {
|
|
|
|
description = "landing service accounts list."
|
|
|
|
type = string
|
|
|
|
default = "sa-landing"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "project_ids" {
|
|
|
|
description = "Project IDs."
|
|
|
|
type = object({
|
|
|
|
datamart = string
|
|
|
|
dwh = string
|
|
|
|
landing = string
|
|
|
|
services = string
|
|
|
|
transformation = string
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-06-10 08:04:27 -07:00
|
|
|
variable "service_account_names" {
|
2021-06-10 00:58:40 -07:00
|
|
|
description = "Project service accounts list."
|
|
|
|
type = object({
|
|
|
|
datamart = string
|
|
|
|
dwh = string
|
|
|
|
landing = string
|
|
|
|
services = string
|
|
|
|
transformation = string
|
|
|
|
})
|
|
|
|
default = {
|
|
|
|
datamart = "sa-datamart"
|
|
|
|
dwh = "sa-datawh"
|
|
|
|
landing = "sa-landing"
|
|
|
|
services = "sa-services"
|
|
|
|
transformation = "sa-transformation"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "transformation_buckets" {
|
|
|
|
description = "List of transformation buckets to create"
|
2021-06-10 08:04:27 -07:00
|
|
|
type = map(object({
|
|
|
|
location = string
|
|
|
|
name = string
|
|
|
|
}))
|
2021-06-10 00:58:40 -07:00
|
|
|
default = {
|
|
|
|
temp = {
|
|
|
|
location = "EU"
|
2021-06-10 08:04:27 -07:00
|
|
|
name = "temp"
|
2021-06-10 00:58:40 -07:00
|
|
|
},
|
|
|
|
templates = {
|
|
|
|
location = "EU"
|
2021-06-10 08:04:27 -07:00
|
|
|
name = "templates"
|
2021-06-10 00:58:40 -07:00
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "transformation_subnets" {
|
|
|
|
description = "List of subnets to create in the transformation Project."
|
2021-06-10 08:04:27 -07:00
|
|
|
type = list(object({
|
|
|
|
ip_cidr_range = string
|
|
|
|
name = string
|
|
|
|
region = string
|
|
|
|
secondary_ip_range = map(string)
|
|
|
|
}))
|
2021-06-10 00:58:40 -07:00
|
|
|
default = [
|
|
|
|
{
|
2021-06-10 08:04:27 -07:00
|
|
|
ip_cidr_range = "10.1.0.0/20"
|
|
|
|
name = "transformation-subnet"
|
2021-06-10 00:58:40 -07:00
|
|
|
region = "europe-west3"
|
2021-06-10 08:04:27 -07:00
|
|
|
secondary_ip_range = {}
|
2021-06-10 00:58:40 -07:00
|
|
|
},
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "transformation_vpc_name" {
|
|
|
|
description = "Name of the VPC created in the transformation Project."
|
|
|
|
type = string
|
|
|
|
default = "transformation-vpc"
|
|
|
|
}
|
2021-06-25 04:06:19 -07:00
|
|
|
|
|
|
|
variable "service_encryption_key_ids" {
|
2021-06-28 01:57:11 -07:00
|
|
|
description = "Cloud KMS encryption key in {LOCATION => [KEY_URL]} format. Keys belong to existing project."
|
2021-06-25 04:06:19 -07:00
|
|
|
type = object({
|
|
|
|
multiregional = string
|
|
|
|
global = string
|
|
|
|
})
|
|
|
|
default = {
|
|
|
|
multiregional = null
|
|
|
|
global = null
|
|
|
|
}
|
|
|
|
}
|