fix: potential fix on plan firewall

This commit is contained in:
2025-12-04 10:18:56 +01:00
parent 5697b71dbe
commit 0ce8512917

View File

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