forked from pierront/but3-iac
fix: potential fix on plan firewall
This commit is contained in:
@@ -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 = "test-terraform-allow-frontend-to-backend"
|
name = "${var.project_name}-allow-frontend-to-backend"
|
||||||
network = google_compute_network.vpc.id
|
network = google_compute_network.vpc.id
|
||||||
|
|
||||||
allow {
|
allow {
|
||||||
@@ -62,12 +62,13 @@ resource "google_compute_firewall" "allow_frontend_to_backend" {
|
|||||||
ports = ["8000"]
|
ports = ["8000"]
|
||||||
}
|
}
|
||||||
|
|
||||||
source_tags = ["frontend"]
|
source_ranges = [var.frontend_cidr]
|
||||||
|
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 = "test-terraform-allow-backend-to-database"
|
name = "${var.project_name}-allow-backend-to-database"
|
||||||
network = google_compute_network.vpc.id
|
network = google_compute_network.vpc.id
|
||||||
|
|
||||||
allow {
|
allow {
|
||||||
@@ -75,6 +76,7 @@ resource "google_compute_firewall" "allow_backend_to_database" {
|
|||||||
ports = ["3306"]
|
ports = ["3306"]
|
||||||
}
|
}
|
||||||
|
|
||||||
source_tags = ["backend"]
|
source_ranges = [var.backend_cidr]
|
||||||
|
source_tags = ["backend"]
|
||||||
target_tags = ["database"]
|
target_tags = ["database"]
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user