Deploy CR service in service project if use case is using ILB
This commit is contained in:
parent
117141cdb0
commit
29af0f3b31
|
@ -92,7 +92,8 @@ module "project_svc1" {
|
|||
}
|
||||
services = [
|
||||
"compute.googleapis.com",
|
||||
"dns.googleapis.com"
|
||||
"dns.googleapis.com",
|
||||
"run.googleapis.com"
|
||||
]
|
||||
skip_delete = true
|
||||
}
|
||||
|
@ -101,10 +102,12 @@ module "project_svc1" {
|
|||
# Cloud Run #
|
||||
###############################################################################
|
||||
|
||||
# Cloud Run service in main project
|
||||
# Cloud Run service. Usually in the main project, but created in a service project
|
||||
# if the use case is using an L7ILB and custom domain
|
||||
module "cloud_run_main" {
|
||||
source = "../../../modules/cloud-run"
|
||||
project_id = module.project_main.project_id
|
||||
project_id = (var.custom_domain == null ?
|
||||
module.project_main.project_id : module.project_svc1[0].project_id)
|
||||
name = var.run_svc_name
|
||||
region = var.region
|
||||
containers = [{
|
||||
|
|
|
@ -29,6 +29,12 @@ variable "access_policy_create" {
|
|||
default = null
|
||||
}
|
||||
|
||||
variable "custom_domain" {
|
||||
description = "Custom domain for the Load Balancer."
|
||||
type = string
|
||||
default = null
|
||||
}
|
||||
|
||||
variable "image" {
|
||||
description = "Container image to deploy."
|
||||
type = string
|
||||
|
|
Loading…
Reference in New Issue