This commit is contained in:
Florian GENIQUE 2024-12-06 15:34:58 +01:00
parent bfecc2baaf
commit a19d6855b2
2 changed files with 13 additions and 6 deletions

View File

@ -35,9 +35,16 @@ module "network" {
# Autres variables spécifiques au module
}*/
/*module "compute" {
module "compute" {
source = "../../modules/compute"
zone = var.zone
instance_type = var.instance_type
frontend_subnet_id = module.network.id_subnetwork["frontend"]
backend_subnet_id = module.network.id_subnetwork["backend"]
database_subnet_id = module.network.id_subnetwork["database"]
}*/
}

View File

@ -10,7 +10,7 @@ resource "google_compute_instance" "vm-front" {
}
}
network_interface {
subnetwork = google_compute_network.subnet_front.id
subnetwork = google_compute_network.frontend_subnet_id
access_config {} # IP publique
}
@ -35,7 +35,7 @@ resource "google_compute_instance" "vm-back" {
}
network_interface {
subnetwork = google_compute_network.subnet_back.id
subnetwork = google_compute_network.backend_subnet_id
access_config {} # IP publique
}
@ -47,7 +47,7 @@ resource "google_compute_instance" "vm-back" {
}
resource "google_compute_instance" "vm-database" {
name = "vm"-database
name = "vm-database"
machine_type = var.instance_type
zone = var.zone
@ -59,7 +59,7 @@ resource "google_compute_instance" "vm-database" {
}
network_interface {
subnetwork = google_compute_network.subnet_db.id
subnetwork = google_compute_network.database_subnet_id
access_config {} # IP publique
}