From d4b45200d838870da972984ccd08a17ce6100c8f Mon Sep 17 00:00:00 2001 From: Vallat Date: Fri, 6 Dec 2024 15:40:52 +0100 Subject: [PATCH] compute --- environments/dev/main.tf | 5 ++++- environments/dev/variables.tf | 1 + modules/compute/variables.tf | 15 ++++++++++++++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/environments/dev/main.tf b/environments/dev/main.tf index 833488d..cc345aa 100644 --- a/environments/dev/main.tf +++ b/environments/dev/main.tf @@ -30,7 +30,10 @@ module "compute" { source = "../../modules/compute" # Variables d'entrée - + sub1 = module.network.subnet["frontend"] + sub2 = module.network.subnet["backend"] + sub3 = module.network.subnet["database"] + # Autres variables spécifiques au module zone = var.zone instance_type = var.instance_type diff --git a/environments/dev/variables.tf b/environments/dev/variables.tf index 2d99e95..d860eef 100644 --- a/environments/dev/variables.tf +++ b/environments/dev/variables.tf @@ -51,3 +51,4 @@ variable "zone" { type = string default = "europe-west4-a" } + diff --git a/modules/compute/variables.tf b/modules/compute/variables.tf index a369cab..6a094ee 100644 --- a/modules/compute/variables.tf +++ b/modules/compute/variables.tf @@ -6,7 +6,20 @@ variable "instance_type" { variable "zone" { description = "zone" type = string - default = "europe-west4-a" } +variable "sub1"{ + description = "subnet1 frontend" + type = string +} + +variable "sub2"{ + description = "subnet2 backend" + type = string +} + +variable "sub3"{ + description = "subnet3 database" + type = string +}