-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
38 lines (32 loc) · 810 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
33
34
35
36
37
38
module "vpc" {
source = "./modules/vpc"
vpc_name = var.vpc_name
}
module "firewall" {
source = "./modules/firewall"
vpc_name = module.vpc.vpc_network_name
}
module "ssh-key" {
source = "./modules/ssh-key"
}
module "vm-instance-1" {
source = "./modules/vm-instance"
vpc_name = module.vpc.vpc_network_name
public_key_openssh = module.ssh-key.public_key_openssh
instance_name = "node-1"
}
module "vm-instance-2" {
source = "./modules/vm-instance"
vpc_name = module.vpc.vpc_network_name
public_key_openssh = module.ssh-key.public_key_openssh
instance_name = "node-2"
}
module "nfs" {
source = "./modules/nfs"
vpc_name = module.vpc.vpc_network_name
public_key_openssh = module.ssh-key.public_key_openssh
}
provider "google" {
project = var.project_id
region = var.region
}