forked from pierront/but3-iac
Add: Output
This commit is contained in:
@@ -0,0 +1,46 @@
|
|||||||
|
output "ip_internes" {
|
||||||
|
value = {
|
||||||
|
frontend = google_compute_instance.vm_frontend.network_interface[0].network_ip
|
||||||
|
backend = google_compute_instance.vm_backend.network_interface[0].network_ip
|
||||||
|
database = google_compute_instance.vm_database.network_interface[0].network_ip
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
output "ip_public_frontend" {
|
||||||
|
value = google_compute_instance.vm_frontend.network_interface[0].access_config[0].nat_ip
|
||||||
|
}
|
||||||
|
|
||||||
|
output "nom_instances" {
|
||||||
|
value = {
|
||||||
|
frontend = google_compute_instance.vm_frontend.name
|
||||||
|
backend = google_compute_instance.vm_backend.name
|
||||||
|
database = google_compute_instance.vm_database.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
output "service_account_email"{
|
||||||
|
description = "Service account email"
|
||||||
|
value = google.service.account.myaccount.email
|
||||||
|
}
|
||||||
|
|
||||||
|
output "service_account_key"{
|
||||||
|
description = "Service key"
|
||||||
|
sensitive = true
|
||||||
|
value = google.service.account.mykey.private_key
|
||||||
|
}
|
||||||
|
output "vpc_terraform" {
|
||||||
|
description = "ID du VPC créé"
|
||||||
|
value = google_compute_network.vpc.id
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
output "subnet_ids" {
|
||||||
|
description = "Map des IDs des sous-réseaux"
|
||||||
|
value = {
|
||||||
|
|
||||||
|
frontend = google_compute_subnetwork.frontend_network.id
|
||||||
|
backend = google_compute_subnetwork.backend_network.id
|
||||||
|
database = google_compute_subnetwork.database_network.id
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user