This commit is contained in:
Florian GENIQUE 2024-12-06 15:07:16 +01:00
parent a039557abb
commit a8cddb7868
2 changed files with 3 additions and 14 deletions

View File

@ -10,7 +10,7 @@ resource "google_compute_instance" "vm-front" {
} }
} }
network_interface { network_interface {
subnetwork = google_compute_network.subnet_front.id subnetwork = google_compute_network.frontend.id
access_config {} # IP publique access_config {} # IP publique
} }
@ -35,7 +35,7 @@ resource "google_compute_instance" "vm-back" {
} }
network_interface { network_interface {
subnetwork = google_compute_network.subnet_back.id subnetwork = google_compute_network.backend.id
access_config {} # IP publique access_config {} # IP publique
} }
@ -59,7 +59,7 @@ resource "google_compute_instance" "vm-database" {
} }
network_interface { network_interface {
subnetwork = google_compute_network.subnet_db.id subnetwork = google_compute_network.database.id
access_config {} # IP publique access_config {} # IP publique
} }

View File

@ -1,12 +1 @@
# Output d'un module # Output d'un module
output "vpc_id" {
value = google_compute_network.vpc.id
}
output "subnet_ids" {
value = {
frontend = google_compute_subnetwork.subnet_front.id,
backend = google_compute_subnetwork.subnet_back.id,
database = google_compute_subnetwork.subnet_db.id
}
}