cloud-foundation-fabric/examples/data-solutions/data-platform-foundations/05-storage-services.tf

96 lines
3.3 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 Datalake storage resources (Bigquery, Cloud Storage).
2022-01-31 21:41:33 -08:00
2022-01-31 21:57:13 -08:00
# Bigquery
2022-01-17 23:58:14 -08:00
module "dtl-0-bq-0" {
source = "../../../modules/bigquery-dataset"
project_id = module.dtl-0-prj.project_id
id = "${replace(local.prefix_dtl, "-", "_")}_0_bq_0"
location = var.location_config.region
2022-01-31 22:09:25 -08:00
encryption_key = try(local.service_encryption_keys.bq, null)
2022-01-17 23:58:14 -08:00
}
module "dtl-1-bq-0" {
source = "../../../modules/bigquery-dataset"
project_id = module.dtl-1-prj.project_id
id = "${replace(local.prefix_dtl, "-", "_")}_1_bq_0"
location = var.location_config.region
2022-01-31 22:09:25 -08:00
encryption_key = try(local.service_encryption_keys.bq, null)
2022-01-17 23:58:14 -08:00
}
module "dtl-2-bq-0" {
source = "../../../modules/bigquery-dataset"
project_id = module.dtl-2-prj.project_id
id = "${replace(local.prefix_dtl, "-", "_")}_2_bq_0"
location = var.location_config.region
2022-01-31 22:09:25 -08:00
encryption_key = try(local.service_encryption_keys.bq, null)
2022-01-17 23:58:14 -08:00
}
2022-02-02 06:31:54 -08:00
module "dtl-plg-bq-0" {
2022-01-17 23:58:14 -08:00
source = "../../../modules/bigquery-dataset"
2022-02-02 06:31:54 -08:00
project_id = module.dtl-plg-prj.project_id
id = "${replace(local.prefix_dtl, "-", "_")}_plg_bq_0"
location = var.location_config.region
2022-01-31 22:09:25 -08:00
encryption_key = try(local.service_encryption_keys.bq, null)
2022-01-17 23:58:14 -08:00
}
2022-01-31 21:57:13 -08:00
# Cloud storage
2022-01-17 23:58:14 -08:00
module "dtl-0-cs-0" {
source = "../../../modules/gcs"
project_id = module.dtl-0-prj.project_id
name = "0-cs-0"
prefix = local.prefix_dtl
location = var.location_config.region
2022-01-17 23:58:14 -08:00
storage_class = "REGIONAL"
2022-01-31 22:09:25 -08:00
encryption_key = try(local.service_encryption_keys.storage, null)
2022-01-17 23:58:14 -08:00
force_destroy = var.data_force_destroy
}
module "dtl-1-cs-0" {
source = "../../../modules/gcs"
project_id = module.dtl-1-prj.project_id
name = "1-cs-0"
prefix = local.prefix_dtl
location = var.location_config.region
2022-01-17 23:58:14 -08:00
storage_class = "REGIONAL"
2022-01-31 22:09:25 -08:00
encryption_key = try(local.service_encryption_keys.storage, null)
2022-01-17 23:58:14 -08:00
force_destroy = var.data_force_destroy
}
module "dtl-2-cs-0" {
source = "../../../modules/gcs"
project_id = module.dtl-2-prj.project_id
name = "2-cs-0"
prefix = local.prefix_dtl
location = var.location_config.region
2022-01-17 23:58:14 -08:00
storage_class = "REGIONAL"
2022-01-31 22:09:25 -08:00
encryption_key = try(local.service_encryption_keys.storage, null)
2022-01-17 23:58:14 -08:00
force_destroy = var.data_force_destroy
}
2022-02-02 06:31:54 -08:00
module "dtl-plg-cs-0" {
2022-01-17 23:58:14 -08:00
source = "../../../modules/gcs"
2022-02-02 06:31:54 -08:00
project_id = module.dtl-plg-prj.project_id
name = "plg-cs-0"
2022-01-17 23:58:14 -08:00
prefix = local.prefix_dtl
location = var.location_config.region
2022-01-17 23:58:14 -08:00
storage_class = "REGIONAL"
2022-01-31 22:09:25 -08:00
encryption_key = try(local.service_encryption_keys.storage, null)
2022-01-17 23:58:14 -08:00
force_destroy = var.data_force_destroy
}