make project creation optional in gcs to bq example

This commit is contained in:
Ludovico Magnocavallo 2022-01-13 16:58:37 +01:00 committed by Julio Castillo
parent 4f79e12365
commit a7a0a15931
2 changed files with 10 additions and 0 deletions

View File

@ -29,6 +29,7 @@ module "project-service" {
name = var.project_service_name
parent = var.root_node
billing_account = var.billing_account
project_create = var.project_create
services = [
"bigquery.googleapis.com",
"bigqueryreservation.googleapis.com",
@ -47,6 +48,7 @@ module "project-kms" {
name = var.project_kms_name
parent = var.root_node
billing_account = var.billing_account
project_create = var.project_create
services = [
"cloudkms.googleapis.com",
]

View File

@ -16,6 +16,7 @@
variable "billing_account" {
description = "Billing account id used as default for new projects."
type = string
default = null
}
variable "location" {
@ -24,6 +25,12 @@ variable "location" {
default = "europe"
}
variable "project_create" {
description = "Set to true to create projects, will use existing ones by default."
type = bool
default = false
}
variable "project_kms_name" {
description = "Name for the new KMS Project."
type = string
@ -43,6 +50,7 @@ variable "region" {
variable "root_node" {
description = "The resource name of the parent Folder or Organization. Must be of the form folders/folder_id or organizations/org_id."
type = string
default = null
}
variable "ssh_source_ranges" {