fix
This commit is contained in:
parent
5bc65ab504
commit
ff4eeddf57
@ -24,7 +24,7 @@ resource "google_compute_subnetwork" "db" {
|
||||
region = var.region
|
||||
}
|
||||
|
||||
resource "google_compute_firewall" "allowhttphttps" {
|
||||
resource "google_compute_firewall" "allow_http-https" {
|
||||
name = "allow-http-https"
|
||||
network = google_compute_network.vpc.id
|
||||
|
||||
@ -37,7 +37,7 @@ resource "google_compute_firewall" "allowhttphttps" {
|
||||
target_tags = ["web"]
|
||||
}
|
||||
|
||||
resource "google_compute_firewall" "allowssh" {
|
||||
resource "google_compute_firewall" "allow_ssh" {
|
||||
name = "allow-ssh"
|
||||
network = google_compute_network.vpc.id
|
||||
|
||||
@ -46,12 +46,12 @@ resource "google_compute_firewall" "allowssh" {
|
||||
ports = ["22"]
|
||||
}
|
||||
|
||||
source_ranges = var.ssh_source_ranges
|
||||
source_ranges = [var.ssh_source_ranges]
|
||||
target_tags = ["web"]
|
||||
}
|
||||
|
||||
|
||||
resource "google_compute_firewall" "fronttoback" {
|
||||
resource "google_compute_firewall" "front-to-back" {
|
||||
name = "front-to-back"
|
||||
network = google_compute_network.vpc.id
|
||||
|
||||
@ -60,19 +60,19 @@ resource "google_compute_firewall" "fronttoback" {
|
||||
ports = ["8000"]
|
||||
}
|
||||
|
||||
source_ranges = var.frontend_cidr
|
||||
source_ranges = [var.frontend_cidr]
|
||||
target_tags = ["backend"]
|
||||
}
|
||||
|
||||
resource "google_compute_firewall" "backtodb" {
|
||||
name = "back-to-db"
|
||||
resource "google_compute_firewall" "back-to-db" {
|
||||
name = "front-to-back"
|
||||
network = google_compute_network.vpc.id
|
||||
|
||||
allow {
|
||||
protocol = "tcp"
|
||||
ports = ["3306"]
|
||||
ports = ["8000"]
|
||||
}
|
||||
|
||||
source_ranges = var.backend_cidr
|
||||
source_ranges = [var.backend_cidr]
|
||||
target_tags = ["database"]
|
||||
}
|
Loading…
Reference in New Issue
Block a user