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" {