-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
176 lines (143 loc) · 3.8 KB
/
variables.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
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
variable "region" {
description = "AWS region when resouces should be created"
default = "ap-south-1"
}
variable "environment" {
type = string
description = "Deployment Environment"
default = "demo"
}
variable "vpc_cidr" {
description = "CIDR block of the vpc"
default = "10.0.0.0/16"
}
variable "public_subnets_cidr" {
type = list(string)
description = "CIDR block for Public Subnet"
default = ["10.0.16.0/20", "10.0.32.0/20"]
}
variable "private_subnets_cidr" {
type = list(string)
description = "CIDR block for Private Subnet"
default = ["10.0.112.0/20", "10.0.144.0/20"]
}
# Security group
# variable "lg_sg_name" {
# type = string
# description = "Load balancer security group name"
# default = "demo-alb-sg"
# }
# variable "app_sg_name" {
# type = string
# description = "Application security group name"
# default = "demo-app-sg"
# }
# variable "lb_name" {
# type = string
# description = "Application load balancer name"
# default = "demo-alb"
# }
variable "lb_type" {
type = string
description = "Type of load balancer"
default = "application"
}
variable "lb_internal" {
type = bool
description = "For internal, it should be 'true'"
default = false
}
# variable "alb_bucket_name" {
# type = string
# description = "Bucket for access logs"
# default = "demo-alb-access-s3"
# }
# Launch config
# variable "launch_configuration_name" {
# type = string
# description = "Name of launch config"
# default = "demo-app-launch-config"
# }
# variable "ssh_key_pair_name" {
# type = string
# description = "SSH key-pair key name"
# default = "demo-app-key"
# }
variable "create_new_key_pair" {
description = "To create key pair or not"
default = false
}
variable "ssh_key_filename" {
description = "public key file path"
default = "~/.ssh/id_rsa.pub"
}
variable "key_pair_existing" {
description = "If create_new_key_pair is false, provide existing key pair name here."
default = "key-pair-name-already-available"
}
variable "instance_type" {
type = string
description = "Instance type of spot instance"
default = "t2.micro"
}
variable "root_volume_size" {
type = number
description = "Root volume size for EC2"
default = 8
}
variable "spot_price" {
type = any
description = "Spot instance max price"
default = 0.0037
}
# variable "autoscaling_group_name" {
# type = string
# description = "Name of autoscaling group"
# default = "demo-app-asg"
# }
variable "min_size" {
type = number
description = "Min capacity in Autoscaling group"
default = 1
}
variable "max_size" {
type = number
description = "Max capacity in Autoscaling group"
default = 2
}
variable "desired_capacity" {
type = number
description = "Desired capacity in Autoscaling group"
default = 1
}
variable "target_type" {
type = string
description = "Target type of the Target group"
default = "instance"
}
# Alarm cloudwatch
# variable "aws_sns_topic_name" {
# type = string
# description = "Name of the SNS topic"
# default = "demo-app-sns-topic"
# }
variable "protocol" {
type = string
description = "Protcol to attach with sns topic" # Ex: email
default = "email"
}
variable "endpoint" {
type = string
description = "Endpoint for the sns notifications"
default = "[email protected]" # ChangeMe
}
# variable "metric" {
# type = string
# description = "Metric Name for the Autoscaling alert alarm"
# default = "CPUUtilization"
# }
# variable "threshold" {
# type = number
# description = "Threshold value for the metrics alarm"
# default = 50
# }