forked from pierront/but3-iac
feat: compute module
This commit is contained in:
22
terraform/modules/compute/outputs.tf
Normal file
22
terraform/modules/compute/outputs.tf
Normal file
@@ -0,0 +1,22 @@
|
||||
output "internal_ips" {
|
||||
description = "IPs internes de toutes les instances"
|
||||
value = {
|
||||
frontend = google_compute_instance.frontend-vm.network_interface[0].network_ip
|
||||
backend = google_compute_instance.backend-vm.network_interface[0].network_ip
|
||||
database = google_compute_instance.database-vm.network_interface[0].network_ip
|
||||
}
|
||||
}
|
||||
|
||||
output "frontend_public_ip" {
|
||||
description = "IP publique du frontend"
|
||||
value = google_compute_instance.frontend-vm.network_interface[0].access_config[0].nat_ip
|
||||
}
|
||||
|
||||
output "instance_names" {
|
||||
description = "Noms des instances"
|
||||
value = {
|
||||
frontend = google_compute_instance.frontend-vm.name
|
||||
backend = google_compute_instance.backend-vm.name
|
||||
database = google_compute_instance.database-vm.name
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user