File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,8 @@ resource "google_bigquery_dataset_iam_member" "dataset_bigquery_data_editor_bind
8282# --- CE: Firewall rules
8383
8484resource "google_compute_firewall" "ingress_health_check" {
85- name = " ${ var . name } -traffic-in"
85+ count = var. healthcheck_enabled == true ? 1 : 0
86+ name = " ${ var . name } -traffic-in"
8687
8788 network = var. network
8889 target_tags = [var . name ]
@@ -245,7 +246,7 @@ module "service" {
245246 service_account_email = google_service_account. sa . email
246247 associate_public_ip_address = var. associate_public_ip_address
247248
248- named_port_http = " http"
249- ingress_port = local. ingress_port
250- health_check_path = " / "
249+ named_port_http = var . healthcheck_enabled == true ? " http" : " "
250+ ingress_port = var . healthcheck_enabled == true ? local. ingress_port : - 1
251+ health_check_path = var . healthcheck_enabled == true ? " / " : " "
251252}
Original file line number Diff line number Diff line change @@ -209,3 +209,9 @@ variable "skip_schemas" {
209209 type = list (string )
210210 default = []
211211}
212+
213+ variable "healthcheck_enabled" {
214+ description = " Whether or not to enable health check probe for GCP instance group"
215+ type = bool
216+ default = true
217+ }
You can’t perform that action at this time.
0 commit comments