diff --git a/tp-cloud/terraform/environments/dev/main.tf b/tp-cloud/terraform/environments/dev/main.tf index 7c6530c..a7b7a5e 100644 --- a/tp-cloud/terraform/environments/dev/main.tf +++ b/tp-cloud/terraform/environments/dev/main.tf @@ -24,4 +24,15 @@ module "network" { frontend_cidr = var.frontend_cidr database_cidr = var.database_cidr ssh_source_ranges = var.ssh_source_ranges +} + + +module "compute" { + source = "../../modules/compute" + + instance_type = "e2-micro" + zone ="europe-west4-a" + frontend_subnet_id = module.network.id_subnetwork["frontend"] + backend_subnet_id = module.network.id_subnetwork["backend"] + database_subnet_id = module.network.id_subnetwork["database"] } \ No newline at end of file diff --git a/tp-cloud/terraform/environments/dev/variables.tf b/tp-cloud/terraform/environments/dev/variables.tf index 1e0797e..303dbe5 100644 --- a/tp-cloud/terraform/environments/dev/variables.tf +++ b/tp-cloud/terraform/environments/dev/variables.tf @@ -1,19 +1,19 @@ variable "project_name" { description = "Nom du projet" type = string - default = "tp-1-docker" + default = "newtp" } variable "project_id" { description = "ID du projet" type = string - default = "tp-1-docker" + default = "newtp" } variable "region" { description = "RĂ©gion du projet" type = string - default = "europe-west4" + default = "europe-west9" } variable "frontend_cidr" { diff --git a/tp-cloud/terraform/modules/network/main.tf b/tp-cloud/terraform/modules/network/main.tf index 2a1a23f..a9142f0 100644 --- a/tp-cloud/terraform/modules/network/main.tf +++ b/tp-cloud/terraform/modules/network/main.tf @@ -1,5 +1,5 @@ resource "google_compute_network" "vpc" { - name = "myvpc" + name = "nom" auto_create_subnetworks = false }