forked from pierront/but3-iac
Suite
This commit is contained in:
@@ -30,8 +30,8 @@ module "compute" {
|
|||||||
instance_type = var.instance_type
|
instance_type = var.instance_type
|
||||||
zone = var.zone
|
zone = var.zone
|
||||||
frontend_subnet_id = module.network.subnet_ids.frontend
|
frontend_subnet_id = module.network.subnet_ids.frontend
|
||||||
backend_subnet_id = module.network.subnets.backend
|
backend_subnet_id = module.network.subnets_ids.backend
|
||||||
database_subnet_id = module.network.subnets.database
|
database_subnet_id = module.network.subnets_ids.database
|
||||||
}
|
}
|
||||||
|
|
||||||
module "iam" {
|
module "iam" {
|
||||||
|
|||||||
@@ -3,40 +3,29 @@ output "ip_internes" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
output "ip_public_frontend" {
|
output "ip_public_frontend" {
|
||||||
value = module.compute.vm_frontend.network_interface[0].access_config[0].nat_ip
|
value = module.compute.ip_public_frontend
|
||||||
}
|
}
|
||||||
|
|
||||||
output "nom_instances" {
|
output "nom_instances" {
|
||||||
value = {
|
value = module.compute.nom_instances
|
||||||
frontend = module.compute.nom_instances.vm_frontend
|
|
||||||
backend = google_compute_instance.vm_backend.name
|
|
||||||
database = google_compute_instance.vm_database.name
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
output "service_account_email"{
|
output "service_account_email"{
|
||||||
description = "Service account email"
|
value = module.iam.service_account_email
|
||||||
value = google.service.account.myaccount.email
|
|
||||||
}
|
}
|
||||||
|
|
||||||
output "service_account_key"{
|
output "service_account_key"{
|
||||||
description = "Service key"
|
|
||||||
sensitive = true
|
sensitive = true
|
||||||
value = google.service.account.mykey.private_key
|
value = module.iam.service_account_key
|
||||||
}
|
}
|
||||||
output "vpc_terraform" {
|
output "vpc_terraform" {
|
||||||
description = "ID du VPC créé"
|
|
||||||
value = google_compute_network.vpc.id
|
value = module.network.vpc_terraform
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
output "subnet_ids" {
|
output "subnet_ids" {
|
||||||
description = "Map des IDs des sous-réseaux"
|
|
||||||
value = {
|
|
||||||
|
|
||||||
frontend = google_compute_subnetwork.frontend_network.id
|
value = module.network.subnet_ids
|
||||||
backend = google_compute_subnetwork.backend_network.id
|
|
||||||
database = google_compute_subnetwork.database_network.id
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user