fix: potential fix on plan firewall

This commit is contained in:
2025-12-04 10:30:12 +01:00
parent 0ce8512917
commit cf309ad25e

View File

@@ -54,7 +54,7 @@ resource "google_compute_firewall" "allow_ssh" {
} }
resource "google_compute_firewall" "allow_frontend_to_backend" { resource "google_compute_firewall" "allow_frontend_to_backend" {
name = "${var.project_name}-allow-frontend-to-backend" name = "test-terraform-allow-frontend-to-backend"
network = google_compute_network.vpc.id network = google_compute_network.vpc.id
allow { allow {
@@ -62,13 +62,12 @@ resource "google_compute_firewall" "allow_frontend_to_backend" {
ports = ["8000"] ports = ["8000"]
} }
source_ranges = [var.frontend_cidr]
source_tags = ["frontend"] source_tags = ["frontend"]
target_tags = ["backend"] target_tags = ["backend"]
} }
resource "google_compute_firewall" "allow_backend_to_database" { resource "google_compute_firewall" "allow_backend_to_database" {
name = "${var.project_name}-allow-backend-to-database" name = "test-terraform-allow-backend-to-database"
network = google_compute_network.vpc.id network = google_compute_network.vpc.id
allow { allow {
@@ -76,7 +75,6 @@ resource "google_compute_firewall" "allow_backend_to_database" {
ports = ["3306"] ports = ["3306"]
} }
source_ranges = [var.backend_cidr]
source_tags = ["backend"] source_tags = ["backend"]
target_tags = ["database"] target_tags = ["database"]
} }