From 885643d5a7fcdacb50c33225bfd2cd79ce828a94 Mon Sep 17 00:00:00 2001 From: Tom Moguljak Date: Fri, 6 Dec 2024 14:38:29 +0100 Subject: [PATCH] Ajout de l'output compute --- terraform/modules/compute/outputs.tf | 19 +++++++++++++++++++ terraform/modules/compute/variables.tf | 1 - 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/terraform/modules/compute/outputs.tf b/terraform/modules/compute/outputs.tf index e69de29..b41d4c2 100644 --- a/terraform/modules/compute/outputs.tf +++ b/terraform/modules/compute/outputs.tf @@ -0,0 +1,19 @@ +output "ip_instance" { + value = { + frontend = google_compute_instance.vm_front.network_interface.0.network_ip + backend = google_compute_instance.vm_back.network_interface.0.network_ip + database = google_compute_instance.vm_db.network_interface.0.network_ip + } +} + +output "frontend_public_ip" { + value = google_compute_instance.vm_front.network_interface.0.access_config.0.nat_ip +} + +output "name_instance" { + value = { + frontend = google_compute_instance.vm_front.name + backend = google_compute_instance.vm_back.name + database = google_compute_instance.vm_db.name + } +} \ No newline at end of file diff --git a/terraform/modules/compute/variables.tf b/terraform/modules/compute/variables.tf index d636543..2a067ed 100644 --- a/terraform/modules/compute/variables.tf +++ b/terraform/modules/compute/variables.tf @@ -1,7 +1,6 @@ variable "instance_type" { description = "Type de machine" type = string - } variable "zone" {