forked from int128/terraform-aws-nat-instance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
86 lines (73 loc) · 2.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
variable "enabled" {
description = "Enable or not costly resources"
type = bool
default = true
}
variable "name" {
description = "Name for all the resources as identifier"
type = string
}
variable "vpc_id" {
description = "ID of the VPC"
type = string
}
variable "public_subnet" {
description = "ID of the public subnet to place the NAT instance"
type = string
}
variable "private_subnets_cidr_blocks" {
description = "List of CIDR blocks of the private subnets. The NAT instance accepts connections from this subnets"
type = list
}
variable "private_route_table_ids" {
description = "List of ID of the route tables for the private subnets. You can set this to assign the each default route to the NAT instance"
type = list
default = []
}
variable "image_id" {
description = "AMI of the NAT instance. Default to the latest Amazon Linux 2"
type = string
default = ""
}
variable "instance_types" {
description = "Candidates of spot instance type for the NAT instance. This is used in the mixed instances policy"
type = list
default = ["t3.nano", "t3a.nano"]
}
variable "use_spot_instance" {
description = "Whether to use spot or on-demand EC2 instance"
type = bool
default = true
}
variable "key_name" {
description = "Name of the key pair for the NAT instance. You can set this to assign the key pair to the NAT instance"
type = string
default = ""
}
variable "tags" {
description = "Tags applied to resources created with this module"
type = map
default = {}
}
variable "user_data_write_files" {
description = "Additional write_files section of cloud-init"
type = list
default = []
}
variable "user_data_runcmd" {
description = "Additional runcmd section of cloud-init"
type = list
default = []
}
variable "eip_creation" {
description = "Whether to create an elastic ip"
type = bool
default = true
}
locals {
// Generate common tags by merging variables and default Name
common_tags = merge(
var.tags, {
Name = "nat-instance-${var.name}"
})
}