-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmain.tf
More file actions
121 lines (100 loc) · 3.67 KB
/
Copy pathmain.tf
File metadata and controls
121 lines (100 loc) · 3.67 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
module "base-network" {
source = "cn-terraform/networking/aws"
name_prefix = "test-networking"
vpc_cidr_block = "192.168.0.0/16"
availability_zones = ["us-east-1a", "us-east-1b", "us-east-1c", "us-east-1d"]
public_subnets_cidrs_per_availability_zone = ["192.168.0.0/19", "192.168.32.0/19", "192.168.64.0/19", "192.168.96.0/19"]
private_subnets_cidrs_per_availability_zone = ["192.168.128.0/19", "192.168.160.0/19", "192.168.192.0/19", "192.168.224.0/19"]
}
module "nomad" {
source = "../../"
name_prefix = "nomad"
region = "us-east-1"
vpc_id = module.base-network.vpc_id
subnets_ids = module.base-network.private_subnets_ids
}
variable "route53_zone_id" {
description = "Route53 Zone ID to fetch"
}
variable "domain_name" {
description = "Domain Name"
}
variable "ssh_key_name" {
description = "SSH Key Name"
}
#------------------------------------------------------------------------------
# SECURITY GROUP
#------------------------------------------------------------------------------
variable "cidrs_to_open_ports_on_security_groups" {
description = "List of CIDRs to open ports on instances security group"
type = list(any)
}
variable "ports_to_open_on_elb_security_group" {
description = "Ports to Open on ELB Security Group"
type = list(any)
default = ["22", "80", "443"]
}
variable "tcp_ports_to_open_on_instances_security_group" {
description = "TCP Ports to Open on Instances Security Group"
type = list(any)
default = ["22", "4646", "4647", "4648", "8300", "8301", "8302", "8500", "8600"]
}
variable "udp_ports_to_open_on_instances_security_group" {
description = "UDP Ports to Open on Instances Security Group"
type = list(any)
default = ["4648", "8301", "8302", "8600"]
}
#------------------------------------------------------------------------------
# VERSIONS
#------------------------------------------------------------------------------
variable "consul_version" {
description = "Consul Version"
default = "v1.11.4"
}
variable "nomad_version" {
description = "Nomad Version"
default = "v1.2.6"
}
variable "consul_address" {
description = "Consul Address"
}
#------------------------------------------------------------------------------
# SERVER SETTINGS
#------------------------------------------------------------------------------
variable "server_ami_id" {
description = "AMI ID to use on servers"
type = string
}
variable "server_instance_type" {
description = "AWS Instance type to use on servers"
type = string
}
variable "server_asg_min_size" {
description = "Min Number of Instances of PAAS Server to Create"
}
variable "server_asg_desired_capacity" {
description = "Desired Number of Instances of PAAS Server to Create"
}
variable "server_asg_max_size" {
description = "Max Number of Instances of PAAS Server to Create"
}
#------------------------------------------------------------------------------
# NOMAD CLIENT SETTINGS
#------------------------------------------------------------------------------
variable "client_ami_id" {
description = "AMI ID to use on Clients"
type = string
}
variable "client_instance_type" {
description = "AWS Instance type to use on clients"
type = string
}
variable "client_asg_min_size" {
description = "Min Number of Instances of Nomad Client to Create"
}
variable "client_asg_desired_capacity" {
description = "Desired Number of Instances of Nomad Client to Create"
}
variable "client_asg_max_size" {
description = "Max Number of Instances of Nomad Client to Create"
}