From feb2de3303b98aa8fd4d7ccf8ef8ed0881906258 Mon Sep 17 00:00:00 2001 From: nelet Date: Wed, 4 Dec 2024 16:34:58 +0100 Subject: [PATCH] oui --- tp-cloud/terraform/modules/network/main.tf | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tp-cloud/terraform/modules/network/main.tf b/tp-cloud/terraform/modules/network/main.tf index af288c9..619ea46 100644 --- a/tp-cloud/terraform/modules/network/main.tf +++ b/tp-cloud/terraform/modules/network/main.tf @@ -24,8 +24,8 @@ resource "google_compute_subnetwork" "database" { region = var.region } -resource "google_compute_firewall" "AllowHttpHttps" { - name = "AllowHttpHttps" +resource "google_compute_firewall" "allow-http-https" { + name = "allow-http-https" network = google_compute_network.vpc.id allow { @@ -37,8 +37,8 @@ resource "google_compute_firewall" "AllowHttpHttps" { target_tags = ["web"] } -resource "google_compute_firewall" "AllowSsh" { - name = "AllowSsh" +resource "google_compute_firewall" "allow-ssh" { + name = "allow-ssh" network = google_compute_network.vpc.id allow { @@ -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" { - name = "FrontToBack" +resource "google_compute_firewall" "front-to-back" { + name = "front-to-back" network = google_compute_network.vpc.id allow { @@ -59,12 +59,12 @@ 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 = "BackToDb" +resource "google_compute_firewall" "back-to-db" { + name = "back-to-db" network = google_compute_network.vpc.id allow { @@ -72,6 +72,6 @@ resource "google_compute_firewall" "BackToDb" { ports = ["3306"] } - source_ranges = var.backend_cidr + source_ranges = [var.backend_cidr] target_tags = ["database"] } \ No newline at end of file