diff --git a/modules/compute/main.tf b/modules/compute/main.tf index 793128f..2fc3959 100644 --- a/modules/compute/main.tf +++ b/modules/compute/main.tf @@ -10,7 +10,7 @@ resource "google_compute_instance" "vm-front" { } } network_interface { - subnetwork = "google_compute_network.subnet1.id" + subnetwork = var.sub1 access_config {} # IP publique } @@ -35,7 +35,7 @@ resource "google_compute_instance" "vm-back" { } network_interface { - subnetwork = "google_compute_network.subnet2.id" + subnetwork = var.sub2 access_config {} # IP publique } @@ -59,7 +59,7 @@ resource "google_compute_instance" "vm-database" { } network_interface { - subnetwork = "google_compute_network.subnet3.id" + subnetwork = var.sub3 access_config {} # IP publique }