2023-02-10 03:30:39 -08:00
|
|
|
/**
|
|
|
|
* Copyright 2023 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.
|
|
|
|
*/
|
2023-01-24 02:14:21 -08:00
|
|
|
|
2023-02-10 03:46:34 -08:00
|
|
|
variable "custom_domain" {
|
2023-02-10 05:13:56 -08:00
|
|
|
description = "Custom domain for the Load Balancer."
|
2023-01-25 01:17:46 -08:00
|
|
|
type = string
|
2023-02-10 03:46:34 -08:00
|
|
|
default = null
|
2023-01-25 01:17:46 -08:00
|
|
|
}
|
|
|
|
|
2023-02-10 03:46:34 -08:00
|
|
|
variable "iap" {
|
2023-02-10 05:13:56 -08:00
|
|
|
description = "Identity-Aware Proxy for Cloud Run in the LB."
|
2023-02-10 03:46:34 -08:00
|
|
|
type = object({
|
|
|
|
enabled = optional(bool, false)
|
|
|
|
app_title = optional(string, "Cloud Run Explore Application")
|
|
|
|
oauth2_client_name = optional(string, "Test Client")
|
|
|
|
email = optional(string)
|
|
|
|
})
|
|
|
|
default = {}
|
2023-01-25 01:17:46 -08:00
|
|
|
}
|
|
|
|
|
2023-01-24 02:14:21 -08:00
|
|
|
variable "image" {
|
2023-02-10 05:13:56 -08:00
|
|
|
description = "Container image to deploy."
|
2023-01-24 02:14:21 -08:00
|
|
|
type = string
|
2023-01-26 05:04:45 -08:00
|
|
|
default = "us-docker.pkg.dev/cloudrun/container/hello"
|
2023-01-25 01:17:46 -08:00
|
|
|
}
|
|
|
|
|
2023-01-30 07:53:23 -08:00
|
|
|
variable "ingress_settings" {
|
2023-02-10 05:13:56 -08:00
|
|
|
description = "Ingress traffic sources allowed to call the service."
|
2023-01-30 07:53:23 -08:00
|
|
|
type = string
|
|
|
|
default = "all"
|
|
|
|
}
|
2023-01-30 11:30:35 -08:00
|
|
|
|
2023-02-10 08:29:36 -08:00
|
|
|
variable "project_create" {
|
|
|
|
description = "Parameters for the creation of a new project."
|
|
|
|
type = object({
|
|
|
|
billing_account_id = string
|
|
|
|
parent = string
|
|
|
|
})
|
|
|
|
default = null
|
|
|
|
}
|
|
|
|
|
2023-02-10 03:46:34 -08:00
|
|
|
variable "project_id" {
|
2023-02-10 05:13:56 -08:00
|
|
|
description = "Project ID."
|
2023-02-10 03:46:34 -08:00
|
|
|
type = string
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "region" {
|
2023-02-10 05:13:56 -08:00
|
|
|
description = "Cloud region where resource will be deployed."
|
2023-02-10 03:46:34 -08:00
|
|
|
type = string
|
|
|
|
default = "europe-west1"
|
|
|
|
}
|
|
|
|
|
|
|
|
variable "run_svc_name" {
|
2023-02-10 05:13:56 -08:00
|
|
|
description = "Cloud Run service name."
|
2023-02-10 03:46:34 -08:00
|
|
|
type = string
|
|
|
|
default = "hello"
|
|
|
|
}
|
|
|
|
|
2023-01-30 11:30:35 -08:00
|
|
|
variable "security_policy" {
|
2023-02-10 05:13:56 -08:00
|
|
|
description = "Security policy (Cloud Armor) to enforce in the LB."
|
2023-01-30 11:30:35 -08:00
|
|
|
type = object({
|
2023-02-07 12:01:28 -08:00
|
|
|
enabled = optional(bool, false)
|
|
|
|
ip_blacklist = optional(list(string), ["*"])
|
|
|
|
path_blocked = optional(string, "/login.html")
|
2023-01-30 11:30:35 -08:00
|
|
|
})
|
2023-02-07 12:01:28 -08:00
|
|
|
default = {}
|
2023-01-30 11:30:35 -08:00
|
|
|
}
|