This repository has been archived by the owner on Jul 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
modules.tf
76 lines (66 loc) · 3.04 KB
/
modules.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
module "network" {
source = "./modules/network"
// pass variables from .tfvars
aws_region = "${var.aws_region}"
cluster_name = "${var.cluster_name}"
vpc_cidr_block = "${var.vpc_cidr_block}"
gateway_subnets = "${var.gateway_subnets}"
application_subnets = "${var.application_subnets}"
database_subnets = "${var.database_subnets}"
}
module "eks" {
source = "./modules/eks"
// pass variables from .tfvars
accessing_computer_ip = "${var.accessing_computer_ip}"
aws_region = "${var.aws_region}"
keypair-name = "${var.keypair-name}"
cluster_name = "${var.cluster_name}"
domain_name = "${var.domain_name}"
ec2_instance_type = "${var.ec2_instance_type}"
ec2_ami_image_id = "${var.ec2_ami_image_id}"
eks_nodes_desired_capacity = "${var.eks_nodes_desired_capacity}"
eks_nodes_maximum = "${var.eks_nodes_maximum}"
eks_nodes_minimum = "${var.eks_nodes_minimum}"
eks_system_master_users = "${var.eks_system_master_users}"
// inputs from modules
vpc_id = "${module.network.vpc_id}"
app_subnet_ids = "${module.network.app_subnet_ids}"
gateway_subnet_ids = "${module.network.gateway_subnet_ids}"
}
module "db" {
source = "./modules/db"
//pass variables
# Aurora variables
aurora_db_engine = "${var.aurora_db_engine}"
aurora_db_name = "${var.cluster_name}"
aurora_db_backup_retention_period = "${var.aurora_db_backup_retention_period}"
aurora_db_preferred_backup_window = "${var.aurora_db_preferred_backup_window}"
aurora_db_preferred_maintenance_window = "${var.aurora_db_preferred_maintenance_window}"
aurora_db_instance_class = "${var.aurora_db_instance_class}"
aurora_db_port = "${var.aurora_db_port}"
cluster_name = "${var.cluster_name}"
cluster_master_username = "${var.cluster_master_username}"
cluster_master_password = "${var.cluster_master_password}"
copy_tags_to_snapshot = "${var.copy_tags_to_snapshot}"
deletion_protection = "${var.deletion_protection}"
storage_encrypted = "${var.storage_encrypted}"
kms_key_id = "${var.kms_key_id}"
// inputs from modules
vpc_id = "${module.network.vpc_id}"
cidr_block = "${var.vpc_cidr_block}"
app_subnet_ids = "${module.network.app_subnet_ids}"
app_cidr_block = "${module.network.app_cidr_block}"
rds_subnet_ids = "${module.network.database_subnet_ids}"
}
#to be added later.
# module "alb" {
# source = "./modules/alb"
# // pass variables from .tfvars
# hosted_zone_id = "${var.hosted_zone_id}"
# hosted_zone_url = "${var.hosted_zone_url}"
# // inputs from modules
# vpc_id = "${module.network.vpc_id}"
# gateway_subnet_ids = "${module.network.gateway_subnet_ids}"
# node_sg_id = "${module.eks.node_sg_id}"
# lb_target_group_arn = "${module.eks.target_group_arn}"
# }