-
-
Notifications
You must be signed in to change notification settings - Fork 113
/
Copy pathvariables.tf
225 lines (191 loc) · 5.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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
variable "zone_id" {
type = string
default = ""
description = "Route53 DNS Zone ID"
}
variable "instance_type" {
type = string
default = "t2.micro"
description = "Bastion instance type"
}
variable "vpc_id" {
type = string
description = "VPC ID"
}
variable "subnets" {
type = list(string)
description = "AWS subnet IDs"
}
variable "user_data" {
type = list(string)
default = []
description = "User data content. Will be ignored if `user_data_base64` is set"
}
variable "user_data_base64" {
type = string
description = "The Base64-encoded user data to provide when launching the instances. If this is set then `user_data` will not be used."
default = ""
}
variable "key_name" {
type = string
default = ""
description = "Key name"
}
variable "ssh_user" {
type = string
description = "Default SSH user for this AMI. e.g. `ec2-user` for Amazon Linux and `ubuntu` for Ubuntu systems"
default = "ec2-user"
}
variable "root_block_device_encrypted" {
type = bool
default = true
description = "Whether to encrypt the root block device"
}
variable "root_block_device_volume_size" {
type = number
default = 8
description = "The volume size (in GiB) to provision for the root block device. It cannot be smaller than the AMI it refers to."
}
variable "disable_api_termination" {
type = bool
description = "Enable EC2 Instance Termination Protection"
default = false
}
variable "monitoring" {
type = bool
description = "Launched EC2 instance will have detailed monitoring enabled"
default = true
}
variable "metadata_http_endpoint_enabled" {
type = bool
default = true
description = "Whether the metadata service is available"
}
variable "metadata_http_put_response_hop_limit" {
type = number
default = 1
description = "The desired HTTP PUT response hop limit (between 1 and 64) for instance metadata requests."
}
variable "metadata_http_tokens_required" {
type = bool
default = true
description = "Whether or not the metadata service requires session tokens, also referred to as Instance Metadata Service Version 2."
}
variable "associate_public_ip_address" {
type = bool
default = false
description = "Whether to associate a public IP to the instance."
}
variable "assign_eip_address" {
type = bool
description = "Assign an Elastic IP address to the instance"
default = true
}
variable "host_name" {
type = string
default = "bastion"
description = "The Bastion hostname created in Route53"
}
variable "user_data_template" {
type = string
default = "user_data/amazon-linux.sh"
description = "User Data template to use for provisioning EC2 Bastion Host"
}
variable "ami_filter" {
description = "List of maps used to create the AMI filter for the action runner AMI."
type = map(list(string))
default = {
name = ["amzn2-ami-hvm-2.*-x86_64-ebs"]
}
}
variable "ami_owners" {
description = "The list of owners used to select the AMI of action runner instances."
type = list(string)
default = ["amazon"]
}
variable "ami" {
type = string
description = "AMI to use for the instance. Setting this will ignore `ami_filter` and `ami_owners`."
default = null
}
variable "ssm_enabled" {
description = "Enable SSM Agent on Host."
type = bool
default = true
}
variable "security_groups" {
type = list(string)
description = "A list of Security Group IDs to associate with bastion host."
default = []
}
variable "security_group_enabled" {
type = bool
description = "Whether to create default Security Group for bastion host."
default = true
}
variable "security_group_description" {
type = string
default = "Bastion host security group"
description = "The Security Group description."
}
variable "security_group_use_name_prefix" {
type = bool
default = false
description = "Whether to create a default Security Group with unique name beginning with the normalized prefix."
}
variable "security_group_rules" {
type = list(any)
default = [
{
type = "egress"
from_port = 0
to_port = 0
protocol = -1
cidr_blocks = ["0.0.0.0/0"]
description = "Allow all outbound traffic"
},
{
type = "ingress"
protocol = "tcp"
from_port = 22
to_port = 22
cidr_blocks = ["0.0.0.0/0"]
description = "Allow all inbound to SSH"
}
]
description = <<-EOT
A list of maps of Security Group rules.
The values of map is fully complated with `aws_security_group_rule` resource.
To get more info see https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/security_group_rule .
EOT
}
variable "ebs_block_device_encrypted" {
type = bool
default = true
description = "Whether to encrypt the EBS block device"
}
variable "ebs_block_device_volume_size" {
type = number
default = 0
description = "The volume size (in GiB) to provision for the EBS block device. Creation skipped if size is 0"
}
variable "ebs_delete_on_termination" {
type = bool
default = true
description = "Whether the EBS volume should be destroyed on instance termination"
}
variable "ebs_device_name" {
type = string
default = "/dev/sdh"
description = "The name of the EBS block device to mount on the instance"
}
variable "ebs_snapshot_id" {
type = string
default = ""
description = "The snapshot id to use for the EBS block device"
}
variable "instance_profile" {
type = string
description = "A pre-defined profile to attach to the instance (default is to build our own)"
default = ""
}