-
Notifications
You must be signed in to change notification settings - Fork 7
/
main.tf
76 lines (63 loc) · 1.83 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
provider "aws" {
region = var.aws_region
}
module "vpc" {
source = "./vpc"
cluster_name = var.cluster_name
cidr_blocks = var.cidr_blocks
aws_region = var.aws_region
default_tags = var.default_tags
aws_azs = var.aws_azs
vpc_private_subnet_cidrs = var.vpc_private_subnet_cidrs
vpc_public_subnet_cidrs = var.vpc_public_subnet_cidrs
}
module "security-groups" {
source = "./security-groups"
vpc_id = module.vpc.vpc_id
cluster_name = var.cluster_name
aws_region = var.aws_region
default_tags = var.default_tags
cidr_blocks = var.cidr_blocks
}
module "iam-roles" {
source = "./iam-roles"
cluster_name = var.cluster_name
aws_region = var.aws_region
default_tags = var.default_tags
}
module "route-53" {
source = "./route-53"
vpc_id = module.vpc.vpc_id
cluster_name = var.cluster_name
cluster_domain = var.cluster_domain
aws_region = var.aws_region
default_tags = var.default_tags
}
module "bastion-node" {
source = "./bastion-node"
vpc_id = module.vpc.vpc_id
cluster_name = var.cluster_name
aws_region = var.aws_region
default_tags = var.default_tags
bastion_ami = var.bastion_ami
bastion_disk = var.bastion_disk
bastion_type = var.bastion_type
vpc_public_subnet_cidrs = var.vpc_public_subnet_cidrs
master_sg_ids = [module.security-groups.master_sg_id]
aws_ssh_key = var.aws_ssh_key
}
module "registry-node" {
source = "./registry-node"
depends_on = [module.route-53]
vpc_id = module.vpc.vpc_id
registry_sg_ids = [module.security-groups.registry_sg_id]
cluster_name = var.cluster_name
cluster_domain = var.cluster_domain
aws_region = var.aws_region
default_tags = var.default_tags
registry_type = var.registry_type
vpc_private_subnet_cidrs = var.vpc_private_subnet_cidrs
rhcos_ami = var.rhcos_ami
registry_volume = var.registry_volume
ssh_public_key = var.ssh_public_key
}