diff --git a/main.tf b/main.tf index ee3832a..c554305 100644 --- a/main.tf +++ b/main.tf @@ -67,8 +67,9 @@ module "nat-gateway" { wait_for_instances = true metadata = "${var.metadata}" ssh_source_ranges = "${var.ssh_source_ranges}" + http_health_check = "${var.autohealing_enabled}" - update_strategy = "ROLLING_UPDATE" + update_strategy = "ROLLING_UPDATE" rolling_update_policy = [{ type = "PROACTIVE" diff --git a/variables.tf b/variables.tf index 474f90b..e8818c2 100644 --- a/variables.tf +++ b/variables.tf @@ -112,6 +112,11 @@ variable instance_labels { default = {} } +variable autohealing_enabled { + description = "Enable instance autohealing using http health check" + default = false +} + variable region_params { description = "Map of default zones and IPs for each region. Can be overridden using the `zone` and `ip` variables." type = "map"