From fb598291603ab7d4b83b04618d287e33e0b8f11a Mon Sep 17 00:00:00 2001 From: gregory hendrickson Date: Thu, 30 Mar 2023 06:27:25 -0700 Subject: [PATCH] modified firewall_rules and load_balancer --- modules/firewall_rules/main.tf | 13 +++++++++++++ modules/load_balancer/main.tf | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/modules/firewall_rules/main.tf b/modules/firewall_rules/main.tf index e69de29..0b0d786 100644 --- a/modules/firewall_rules/main.tf +++ b/modules/firewall_rules/main.tf @@ -0,0 +1,13 @@ +resource "google_compute_firewall" "allow_http" { + name = "allow-http" + project = var.project_id + network = "default" + + allow { + protocol = "tcp" + ports = ["80"] + } + + target_tags = ["http-server"] + source_ranges = ["0.0.0.0/0"] +} diff --git a/modules/load_balancer/main.tf b/modules/load_balancer/main.tf index d99067e..5936971 100644 --- a/modules/load_balancer/main.tf +++ b/modules/load_balancer/main.tf @@ -1,7 +1,7 @@ resource "google_compute_backend_service" "backend_service" { name = "backend-service" project = var.project_id -# region = var.region + #region = var.region backend { group = var.backend_instance_group_self_link