-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
43 lines (37 loc) · 1.01 KB
/
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
39
40
41
42
43
provider "google" {
version = "~> 2.12"
credentials = "${file(".keys/terraform-credentials.json")}"
project = var.gcp_project
region = var.gcp_region
zone = var.gcp_zone
}
provider "random" {
version = "~> 2.2"
}
module "network" {
source = "./modules/network"
name = var.gcp_network
}
module "firewall_rules" {
source = "./modules/firewall_rules"
network = module.network.id
}
module "concourse_root_user" {
source = "./modules/user"
name = var.concourse_root_user
ssh_public_key_file = ".ssh/id_rsa.pub"
ssh_private_key_file = ".ssh/id_rsa"
}
module "concourse" {
source = "./modules/concourse"
hostname = var.concourse_hostname
dns_zone = var.gcp_dns_zone
network = module.network.name
port = module.firewall_rules.port.concourse
admin_user = module.concourse_root_user
tags = [
module.firewall_rules.tag.allow_icmp,
module.firewall_rules.tag.allow_ssh,
module.firewall_rules.tag.allow_concourse,
]
}