2021-07-19 07:39:50 -07:00
|
|
|
/**
|
|
|
|
* Copyright 2021 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
|
|
|
|
*
|
|
|
|
* http://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 "region" {
|
2021-07-19 22:52:54 -07:00
|
|
|
description = "Region where the resources will be created."
|
|
|
|
type = string
|
|
|
|
default = "europe-west1"
|
2021-07-19 07:39:50 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "zone" {
|
2021-07-19 22:52:54 -07:00
|
|
|
description = "Zone where the test VM will be created."
|
|
|
|
type = string
|
|
|
|
default = "europe-west1-b"
|
2021-07-19 07:39:50 -07:00
|
|
|
}
|
|
|
|
|
2021-07-20 00:31:54 -07:00
|
|
|
variable "prefix" {
|
|
|
|
description = "Prefix used for resources that need unique names."
|
2021-07-19 22:52:54 -07:00
|
|
|
type = string
|
2021-07-20 00:31:54 -07:00
|
|
|
default = null
|
2021-07-19 07:39:50 -07:00
|
|
|
}
|
|
|
|
|
2021-07-20 00:31:54 -07:00
|
|
|
variable "billing_account_id" {
|
|
|
|
description = "Billing account id used as default for new projects."
|
2021-07-19 22:52:54 -07:00
|
|
|
type = string
|
2021-07-19 07:39:50 -07:00
|
|
|
}
|
|
|
|
|
2021-07-20 00:31:54 -07:00
|
|
|
variable "projects_id" {
|
|
|
|
description = "ID of the projects used in this solution."
|
|
|
|
type = object({
|
|
|
|
onprem = string
|
|
|
|
function = string
|
|
|
|
})
|
2021-07-19 07:39:50 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "create_projects" {
|
2021-07-19 22:52:54 -07:00
|
|
|
description = "Whether need to create the projects."
|
|
|
|
type = bool
|
|
|
|
default = true
|
2021-07-19 07:39:50 -07:00
|
|
|
}
|
|
|
|
|
2021-07-20 00:31:54 -07:00
|
|
|
variable "root_node" {
|
2021-07-19 22:52:54 -07:00
|
|
|
description = "Root folder or organization under which the projects will be created."
|
|
|
|
type = string
|
2021-07-19 07:39:50 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "cloud_function_gcs_bucket" {
|
2021-07-19 22:52:54 -07:00
|
|
|
description = "Google Storage Bucket used as staging location for the Cloud Function source code."
|
|
|
|
type = string
|
2021-07-19 07:39:50 -07:00
|
|
|
}
|
|
|
|
|
2021-07-19 22:52:54 -07:00
|
|
|
variable "ip_ranges" {
|
|
|
|
description = "IP ranges used for the VPCs."
|
2021-07-20 00:31:54 -07:00
|
|
|
type = object({
|
|
|
|
onprem = string
|
|
|
|
hub = string
|
|
|
|
})
|
2021-07-19 22:52:54 -07:00
|
|
|
default = {
|
|
|
|
onprem = "10.0.1.0/24",
|
|
|
|
hub = "10.0.2.0/24"
|
|
|
|
}
|
2021-07-19 07:39:50 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
variable "psc_endpoint" {
|
2021-07-19 22:52:54 -07:00
|
|
|
description = "IP used for the Private Service Connect endpoint, it must not overlap with the hub_ip_range."
|
2021-07-19 07:39:50 -07:00
|
|
|
type = string
|
|
|
|
default = "10.100.100.100"
|
|
|
|
}
|