diff --git a/environments/dev/main.tf b/environments/dev/main.tf index e47f0cb..0384016 100644 --- a/environments/dev/main.tf +++ b/environments/dev/main.tf @@ -39,8 +39,12 @@ module "compute" { source = "../../modules/compute" # Variables d'entrée + instance-type = "e2-micro" + zone = "europe-west4-a" # Autres variables spécifiques au module - zone = var.zone - instance_type = var.instance_type + frontend_subnet_id = module.network.id_subnetwork["frontend"] + backend_subnet_id = module.network.id_subnetwork["backend"] + database_subnet_id = module.network.id_subnetwork["databse"] + } \ No newline at end of file diff --git a/modules/network/outputs.tf b/modules/network/outputs.tf index e69de29..cf7c773 100644 --- a/modules/network/outputs.tf +++ b/modules/network/outputs.tf @@ -0,0 +1,12 @@ +# Output d'un module +output "vpc_id" { + value = google_compute_network.vpc.id +} + +output "subnet_ids" { + value = { + frontend = google_compute_subnetwork.subnet_front.id, + backend = google_compute_subnetwork.subnet_back.id, + database = google_compute_subnetwork.subnet_db.id + } +} \ No newline at end of file diff --git a/templates/ansible.cfg.tpl b/templates/ansible.cfg.tpl new file mode 100644 index 0000000..e69de29