update network main

This commit is contained in:
Come THURET 2024-12-04 16:37:56 +01:00
parent 71a4a48e87
commit 8d7064aacd

View File

@ -8,21 +8,21 @@ resource "google_compute_network" "tp07" {
resource "google_compute_subnetwork" "tp07-frontend" { resource "google_compute_subnetwork" "tp07-frontend" {
name = "tp07-frontend" name = "tp07-frontend"
network = google_compute_network.vpc.id network = google_compute_network.tp07.id
ip_cidr_range = var.frontend_cidr ip_cidr_range = var.frontend_cidr
region = "europe-west4" region = "europe-west4"
} }
resource "google_compute_subnetwork" "tp07-backend" { resource "google_compute_subnetwork" "tp07-backend" {
name = "tp07-backend" name = "tp07-backend"
network = google_compute_network.vpc.id network = google_compute_network.tp07.id
ip_cidr_range = var.backend_cidr ip_cidr_range = var.backend_cidr
region = "europe-west4" region = "europe-west4"
} }
resource "google_compute_subnetwork" "tp07-database" { resource "google_compute_subnetwork" "tp07-database" {
name = "tp07-database" name = "tp07-database"
network = google_compute_network.vpc.id network = google_compute_network.tp07.id
ip_cidr_range = var.database_cidr ip_cidr_range = var.database_cidr
region = "europe-west4" region = "europe-west4"
} }
@ -31,7 +31,7 @@ resource "google_compute_subnetwork" "tp07-database" {
resource "google_compute_firewall" "allow_http_https" { resource "google_compute_firewall" "allow_http_https" {
name = "allow-http-https" name = "allow-http-https"
network = google_compute_network.vpc.id network = google_compute_network.tp07.id
allow { allow {
protocol = "tcp" protocol = "tcp"
@ -44,7 +44,7 @@ resource "google_compute_firewall" "allow_http_https" {
resource "google_compute_firewall" "allow_ssh" { resource "google_compute_firewall" "allow_ssh" {
name = "allow-ssh" name = "allow-ssh"
network = google_compute_network.vpc.id network = google_compute_network.tp07.id
allow { allow {
protocol = "tcp" protocol = "tcp"
@ -57,7 +57,7 @@ resource "google_compute_firewall" "allow_ssh" {
resource "google_compute_firewall" "allow_front-back" { resource "google_compute_firewall" "allow_front-back" {
name = "allow-front-back" name = "allow-front-back"
network = google_compute_network.vpc.id network = google_compute_network.vtp07pc.id
allow { allow {
protocol = "tcp" protocol = "tcp"
@ -70,7 +70,7 @@ resource "google_compute_firewall" "allow_front-back" {
resource "google_compute_firewall" "allow_back-database" { resource "google_compute_firewall" "allow_back-database" {
name = "allow-front-back" name = "allow-front-back"
network = google_compute_network.vpc.id network = google_compute_network.tp07.id
allow { allow {
protocol = "tcp" protocol = "tcp"