From ffce64cc1413571b4548037b5ab0baa29e7b7653 Mon Sep 17 00:00:00 2001 From: Tom Moguljak Date: Fri, 6 Dec 2024 14:57:41 +0100 Subject: [PATCH] Correction de l'utilisation des output --- terraform/environments/dev/main.tf | 12 ++++++------ terraform/environments/dev/variables.tf | 18 ------------------ 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/terraform/environments/dev/main.tf b/terraform/environments/dev/main.tf index ed4305e..9a9ed5d 100644 --- a/terraform/environments/dev/main.tf +++ b/terraform/environments/dev/main.tf @@ -29,10 +29,10 @@ module "network" { module "compute" { source = "../../modules/compute" - #autres variables spécifiques au module - instance_type = var.instance_type - zone = var.zone - frontend_subnet = var.frontend_subnet - backend_subnet = var.backend_subnet - database_subnet = var.database_subnet + #autres variables spécifiques au module + instance_type = var.instance_type + zone = var.zone + frontend_subnet = module.network.subnet_id["frontend"] + backend_subnet = module.network.subnet_id["backend"] + database_subnet = module.network.subnet_id["database"] } \ No newline at end of file diff --git a/terraform/environments/dev/variables.tf b/terraform/environments/dev/variables.tf index 49c6404..b2b6955 100644 --- a/terraform/environments/dev/variables.tf +++ b/terraform/environments/dev/variables.tf @@ -44,22 +44,4 @@ variable "zone" { description = "zone" type = string default = "europe-west4-b" -} - -variable "frontend_subnet" { - description = "sous réseau frontend" - type = string - default = "frontend" -} - -variable "backend_subnet" { - description = "sous réseau backend" - type = string - default = "backend" -} - -variable "database_subnet" { - description = "sous réseau database" - type = string - default = "database" } \ No newline at end of file