-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvariables.tf
129 lines (100 loc) · 3.13 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
###################
# Required Inputs #
###################
variable "name" {
description = "Name of this resource"
}
variable "subnet_ids" {
description = "A list of subnet ids to launch all servers launched by this launch configuration into"
type = "list"
}
###################
# Optional Inputs #
###################
variable "is_live" {
description = "Is a live environment. If true we make live-specific tweaks to this autoscaler"
default = false
}
variable "tags" {
description = "A map of tags to add to all resources"
type = "list"
default = []
}
variable "image_id" {
description = "The AMI image id you'd like to associate with the autoscaling launch configuration"
default = ""
}
variable "instance_type" {
description = "The type of instance you'd like to launch with the autoscaling launch configuration"
default = "t2.nano"
}
variable "iam_instance_profile" {
description = "The name of the instance profile we'll assign to all servers launched by this launch configuration"
default = ""
}
variable "key_name" {
description = "The name of the SSH key to assign to all servers launched by this launch configuration"
default = ""
}
variable "security_groups" {
description = "A list of security group ids to associate with all servers launched by this launch configuration"
type = "list"
default = []
}
variable "volume_size" {
description = "The size of the root disk volume on servers launched from this launch configuration"
default = "10"
}
variable "min_size" {
description = "The minimum number of servers to have running via this autoscaling group"
default = "1"
}
variable "max_size" {
description = "The maximum number of servers to have running via this autoscaling group"
default = "2"
}
variable "load_balancers" {
description = "The load balancers to associate with this autoscaling group"
type = "list"
default = []
}
variable "target_group_arns" {
description = "The target group ARNs to associate with this autoscaling group"
type = "list"
default = []
}
variable "health_check_grace_period" {
description = "The health check grace period"
default = "300"
}
variable "user_data" {
description = "The user-data script to make the instance run on boot via cloud-init"
default = ""
}
###################
# Tertiary Inputs #
###################
variable "associate_public_ip_address" {
description = "If you wish to associate public ips to servers launched from this launch configuration"
default = false
}
variable "spot_price" {
description = "If you wish to be launching spot instances, specify the max price here"
default = ""
}
######################
# Data Lookup Inputs #
######################
# This gets the latest official ubuntu AMI on our region
data "aws_ami" "ubuntu" {
most_recent = true
filter {
name = "name"
values = ["ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-*"]
}
filter {
name = "virtualization-type"
values = ["hvm"]
}
owners = ["099720109477"] # Canonical
}