-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy pathmain.tf
89 lines (68 loc) · 2.99 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
provider "azurerm" {
subscription_id = "${var.subscription_id}"
client_id = "${var.client_id}"
client_secret = "${var.client_secret}"
tenant_id = "${var.tenant_id}"
environment = "${var.cloud_name}"
version = "~> 1.22"
}
terraform {
required_version = "< 0.12.0"
}
module "infra" {
source = "../modules/infra"
env_name = "${var.env_name}"
location = "${var.location}"
dns_subdomain = "${var.dns_subdomain}"
dns_suffix = "${var.dns_suffix}"
pcf_infrastructure_subnet = "${var.pcf_infrastructure_subnet}"
pcf_virtual_network_address_space = "${var.pcf_virtual_network_address_space}"
}
module "ops_manager" {
source = "../modules/ops_manager"
env_name = "${var.env_name}"
location = "${var.location}"
ops_manager_image_uri = "${var.ops_manager_image_uri}"
ops_manager_vm_size = "${var.ops_manager_vm_size}"
ops_manager_private_ip = "${var.ops_manager_private_ip}"
optional_ops_manager_image_uri = "${var.optional_ops_manager_image_uri}"
resource_group_name = "${module.infra.resource_group_name}"
dns_zone_name = "${module.infra.dns_zone_name}"
security_group_id = "${module.infra.security_group_id}"
subnet_id = "${module.infra.infrastructure_subnet_id}"
}
module "pas" {
source = "../modules/pas"
env_name = "${var.env_name}"
location = "${var.location}"
pas_subnet_cidr = "${var.pcf_pas_subnet}"
services_subnet_cidr = "${var.pcf_services_subnet}"
cf_storage_account_name = "${var.cf_storage_account_name}"
cf_buildpacks_storage_container_name = "${var.cf_buildpacks_storage_container_name}"
cf_droplets_storage_container_name = "${var.cf_droplets_storage_container_name}"
cf_packages_storage_container_name = "${var.cf_packages_storage_container_name}"
cf_resources_storage_container_name = "${var.cf_resources_storage_container_name}"
resource_group_name = "${module.infra.resource_group_name}"
dns_zone_name = "${module.infra.dns_zone_name}"
network_name = "${module.infra.network_name}"
bosh_deployed_vms_security_group_id = "${module.infra.bosh_deployed_vms_security_group_id}"
}
module "certs" {
source = "../modules/certs"
env_name = "${var.env_name}"
dns_suffix = "${var.dns_suffix}"
ssl_ca_cert = "${var.ssl_ca_cert}"
ssl_ca_private_key = "${var.ssl_ca_private_key}"
}
module "isolation_segment" {
source = "../modules/isolation_segment"
count = "${var.isolation_segment ? 1 : 0}"
environment = "${var.env_name}"
location = "${var.location}"
ssl_cert = "${var.iso_seg_ssl_cert}"
ssl_private_key = "${var.iso_seg_ssl_private_key}"
ssl_ca_cert = "${var.iso_seg_ssl_ca_cert}"
ssl_ca_private_key = "${var.iso_seg_ssl_ca_private_key}"
resource_group_name = "${module.infra.resource_group_name}"
dns_zone = "${module.infra.dns_zone_name}"
}