Update Output

This commit is contained in:
Tom MOGULJAK 2024-12-06 16:27:41 +01:00
parent 16b512dae9
commit fed533bb2c
3 changed files with 45 additions and 6 deletions
terraform
environments/dev
modules
compute
network

View File

@ -0,0 +1,39 @@
output "vpc_id" {
value = module.network.vpc_id
}
output "subnet_id" {
value = {
frontend = module.network.subnet_id.frontend,
backend = module.network.subnet_id.backend,
database = module.network.subnet_id.database
}
}
output "ip_instance" {
value = {
frontend = module.compute.ip_instance.frontend,
backend = module.compute.ip_instance.backend,
database = module.compute.ip_instance.database
}
}
output "frontend_public_ip" {
value = module.compute.frontend_public_ip
}
output "name_instance" {
value = {
frontend = module.compute.name_instance.frontend,
backend = module.compute.name_instance.backend,
database = module.compute.name_instance.database
}
}
output "service_account_email" {
value = module.iam.service_account_email
}
output "service_account_key" {
value = module.iam.service_account_key
}

View File

@ -1,7 +1,7 @@
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
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
}
}
@ -12,8 +12,8 @@ output "frontend_public_ip" {
output "name_instance" {
value = {
frontend = google_compute_instance.vm_front.name
backend = google_compute_instance.vm_back.name
frontend = google_compute_instance.vm_front.name,
backend = google_compute_instance.vm_back.name,
database = google_compute_instance.vm_db.name
}
}

View File

@ -5,8 +5,8 @@ output "vpc_id" {
output "subnet_id" {
value = {
frontend = google_compute_subnetwork.frontend.id
backend = google_compute_subnetwork.backend.id
frontend = google_compute_subnetwork.frontend.id,
backend = google_compute_subnetwork.backend.id,
database = google_compute_subnetwork.database.id
}
}