-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
32 lines (27 loc) · 905 Bytes
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//export GOOGLE_APPLICATION_CREDENTIALS=/home/utente/.config/gcloud/application_default_credentials.json
provider "google" {
project = "terraform-dev-387508"
region = "europe-west8"
zone = "europe-west8-a"
}
module "google_compute_network" {
source = "./modules/vpc_module"
vpc_networks = var.vpc_networks
}
module "google_compute_instance" {
source = "./modules/vm_instance_module"
vm_instances = var.vm_instances
depends_on = [module.google_compute_network]
}
output "vm_instance"{
description = "Description of the VM instance"
value = { for k, v in var.vm_instances : k => v }
}
output "vpc_network"{
description = "Description of the vpc_network"
value = { for k, v in var.vpc_networks : k => v }
}
output "vpc_subnetwork_id"{
description = "Description of the vpc_subnetwork_id"
value = module.google_compute_network.subnet_id
}