forked from eguven/terraform-aws-bastion-host
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
71 lines (59 loc) · 2.19 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
variable "vpc_id" {
description = "VPC ID for the bastion host."
}
variable "name" {
description = "Used in instance, security group, keypair naming, defaults to 'bastion-host'"
default = "bastion-host"
}
variable "subnet_id" {
description = "Subnet ID to launch bastion host in, if not provided, 'subnet_tags' is used to discover."
default = ""
}
variable "subnet_tags" {
description = "Mapping of tags to discover the public subnet, defaults to { Tier = 'Public' }, see https://www.terraform.io/docs/providers/aws/d/subnet_ids.html#tags"
type = map(string)
default = {
Tier = "Public"
}
}
variable "tcp_ports" {
description = "List of TCP ports to allow in security group, defaults to [22]"
type = list(number)
default = [22]
}
variable "cidr_blocks" {
description = "CIDR blocks to add to bastion host security group, defaults to []."
type = list(string)
default = []
}
variable "extra_security_group_ids" {
description = "Additional SGs to attach to instance, defaults to []."
type = list(string)
default = []
}
variable "allow_current_ip" {
description = "If true, current IP (from https://ipv4.icanhazip.com/) will be allowed on 'tcp_ports', defaults to true."
default = true
}
variable "ami" {
description = "AMI to launch, if not provided, default is Amazon Linux 2 AMI latest."
default = ""
}
variable "instance_type" {
description = "EC2 instance type, defaults to t3.nano."
default = "t3.nano"
}
variable "key_name" {
description = "EC2 keypair name to start the instance with. Either this or 'create_public_key' variable is required."
default = ""
}
variable "create_public_key" {
description = "Map of public public key_name and key_filename to create an EC2 key from, eg. { key_name = 'foo', key_filename = '<some-path>' }. Either this or 'key_name' variable is required. Last resort is using '~/.ssh/id_rsa.pub'."
type = map(string)
default = {}
}
variable "extra_tags" {
description = "Map of extra tags to add to resources, eg. { Environment = 'dev' }. Defaults to {}. Terraform='true' and Name tags are added automatically."
type = map(string)
default = {}
}