From ea72883bb871787a23b09568bd1a6fab72f28aa5 Mon Sep 17 00:00:00 2001 From: SimonSayeBabu Date: Fri, 6 Dec 2024 15:12:04 +0100 Subject: [PATCH] compute --- terraform/modules/compute/outputs.tf | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/terraform/modules/compute/outputs.tf b/terraform/modules/compute/outputs.tf index e69de29..4f5010f 100644 --- a/terraform/modules/compute/outputs.tf +++ b/terraform/modules/compute/outputs.tf @@ -0,0 +1,19 @@ +output "vm_name" { + value = { + frontend = google_compute_instance.vmfrontend.name, + backend = google_compute_instance.vmbackend.name, + database = google_compute_instance.vmdatabase.name + } +} + +output "frontend_public_ip" { + value = google_compute_instance.vmfrontend.network_interface[0].access_config[0].nat_ip +} + +output "private_ip" { + value = { + frontend = google_compute_instance.vmfrontend.network_interface[0].network_ip, + backend = google_compute_instance.vmbackend.network_interface[0].network_ip, + database = google_compute_instance.vmdatabase.network_interface[0].network_ip + } +} \ No newline at end of file