t
This commit is contained in:
@@ -10,7 +10,7 @@ resource "google_compute_instance" "vm-front" {
|
||||
}
|
||||
}
|
||||
network_interface {
|
||||
subnetwork = google_compute_network.frontend_subnet_id
|
||||
subnetwork = var.sub1
|
||||
access_config {} # IP publique
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ resource "google_compute_instance" "vm-back" {
|
||||
}
|
||||
|
||||
network_interface {
|
||||
subnetwork = google_compute_network.backend_subnet_id
|
||||
subnetwork = var.sub2
|
||||
access_config {} # IP publique
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ resource "google_compute_instance" "vm-database" {
|
||||
}
|
||||
|
||||
network_interface {
|
||||
subnetwork = google_compute_network.database_subnet_id
|
||||
subnetwork = var.sub3
|
||||
access_config {} # IP publique
|
||||
}
|
||||
|
||||
|
@@ -28,4 +28,20 @@ variable "database_cidr" {
|
||||
default = "10.0.3.0/24"
|
||||
}
|
||||
|
||||
variable "sub1" {
|
||||
description = "subnet front"
|
||||
type = string
|
||||
}
|
||||
|
||||
|
||||
variable "sub2" {
|
||||
description = "subnet back"
|
||||
type = string
|
||||
}
|
||||
|
||||
|
||||
variable "sub3" {
|
||||
description = "subnet database"
|
||||
type = string
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user