diff --git a/terraform/environments/dev/main.tf b/terraform/environments/dev/main.tf index 2545738..f3dc69f 100644 --- a/terraform/environments/dev/main.tf +++ b/terraform/environments/dev/main.tf @@ -27,9 +27,9 @@ module "network"{ module "compute"{ source = "../../modules/compute" - tp07-frontend = var.tp07-frontend - tp07-backend = var.tp07-backend - tp07-database = var.tp07-database + tp07-frontend = module.network.subnets_ids["frontend"] + tp07-backend = module.network.subnets_ids["backend"] + tp07-database = module.network.subnets_ids["database"] zone = var.zone instance_type = var.instance_type } diff --git a/terraform/environments/dev/variables.tf b/terraform/environments/dev/variables.tf index 8a16ea0..45d8db4 100644 --- a/terraform/environments/dev/variables.tf +++ b/terraform/environments/dev/variables.tf @@ -40,24 +40,6 @@ variable "ssh_source_ranges"{ default = "0.0.0.0/0" } -variable "tp07-frontend"{ - description = "sous réseau frontend" - type = string - default = "tp07-frontend" -} - -variable "tp07-backend"{ - description = "sous réseau backend" - type = string - default = "tp07-backend" -} - -variable "tp07-database"{ - description = "sous réseau database" - type = string - default = "tp07-database" -} - variable "zone"{ description = "region du projet" type = string