Ajout de l'output compute

This commit is contained in:
Tom MOGULJAK 2024-12-06 14:38:29 +01:00
parent bfb830f19c
commit 885643d5a7
2 changed files with 19 additions and 1 deletions

View File

@ -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
}
}

View File

@ -1,7 +1,6 @@
variable "instance_type" { variable "instance_type" {
description = "Type de machine" description = "Type de machine"
type = string type = string
} }
variable "zone" { variable "zone" {