2025-12-04 10:31:09 +01:00
|
|
|
output "service_account_email" {
|
2025-12-04 10:38:41 +01:00
|
|
|
description = "Email du compte de service Terraform"
|
|
|
|
|
value = google_service_account.terraform_sa.email
|
2025-12-04 10:31:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
output "service_account_key" {
|
2025-12-04 10:38:41 +01:00
|
|
|
description = "Clé privée du compte de service Terraform"
|
|
|
|
|
value = google_service_account_key.terraform_sa_key.private_key
|
|
|
|
|
sensitive = true
|
2025-12-04 10:31:09 +01:00
|
|
|
}
|
|
|
|
|
|
2025-12-04 10:38:41 +01:00
|
|
|
output "private_ips" {
|
|
|
|
|
description = "IP internes du frontend, backend et database"
|
2025-12-04 10:31:09 +01:00
|
|
|
value = {
|
2025-12-04 10:38:41 +01:00
|
|
|
frontend = google_compute_instance.frontend.network_interface[0].network_ip
|
|
|
|
|
backend = google_compute_instance.backend.network_interface[0].network_ip
|
|
|
|
|
database = google_compute_instance.database.network_interface[0].network_ip
|
2025-12-04 10:31:09 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-04 10:38:41 +01:00
|
|
|
output "frontend_public_ip" {
|
|
|
|
|
description = "IP publique du frontend"
|
|
|
|
|
value = google_compute_instance.frontend.network_interface[0].access_config[0].nat_ip
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-04 10:31:09 +01:00
|
|
|
output "instance_names" {
|
2025-12-04 10:38:41 +01:00
|
|
|
description = "Noms des instances compute"
|
2025-12-04 10:31:09 +01:00
|
|
|
value = [
|
2025-12-04 10:38:41 +01:00
|
|
|
google_compute_instance.frontend.name,
|
|
|
|
|
google_compute_instance.backend.name,
|
|
|
|
|
google_compute_instance.database.name
|
2025-12-04 10:31:09 +01:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-04 10:38:41 +01:00
|
|
|
output "vpc_terraform_output" {
|
|
|
|
|
value = google_compute_network.vpc_terraform.id
|
2025-12-04 10:31:09 +01:00
|
|
|
}
|
|
|
|
|
|
2025-12-04 10:38:41 +01:00
|
|
|
output "list_id" {
|
|
|
|
|
value = {
|
|
|
|
|
frontend = google_compute_subnetwork.subnet_frontend.id
|
|
|
|
|
backend = google_compute_subnetwork.subnet_backend.id
|
|
|
|
|
database = google_compute_subnetwork.subnet_database.id
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
output "vpc_id" {
|
|
|
|
|
description = "ID du VPC créé"
|
|
|
|
|
value = google_compute_network.vpc_terraform.id
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
output "subnets" {
|
|
|
|
|
description = "IDs des subnets du VPC"
|
|
|
|
|
value = {
|
|
|
|
|
frontend = google_compute_subnetwork.subnet_frontend.id
|
|
|
|
|
backend = google_compute_subnetwork.subnet_backend.id
|
|
|
|
|
database = google_compute_subnetwork.subnet_database.id
|
|
|
|
|
}
|
2025-12-04 10:31:09 +01:00
|
|
|
}
|