-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvariables.tf
More file actions
140 lines (122 loc) · 4.1 KB
/
Copy pathvariables.tf
File metadata and controls
140 lines (122 loc) · 4.1 KB
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
variable "spot_requests" {
description = "Map of spot requests to spot instance variables"
type = map(object({
availability_zone = optional(string)
type = string
hostname = optional(string)
ami = string
iam_instance_profile = optional(string)
raid_array_size = optional(number)
root_volume_size = optional(number)
security_group_ids = list(string)
user_data = optional(string)
user_data_replace_on_change = optional(bool)
placement_group = optional(string)
additional_tags = optional(map(string))
subnet_type = optional(string)
}))
default = {}
}
variable "on_demand_requests" {
description = "Map of on-demand requests to on-demand instance variables"
type = map(object({
availability_zone = optional(string)
type = string
hostname = optional(string)
ami = string
iam_instance_profile = optional(string)
raid_array_size = optional(number)
root_volume_size = optional(number)
security_group_ids = list(string)
user_data = optional(string)
user_data_replace_on_change = optional(bool)
placement_group = optional(string)
additional_tags = optional(map(string))
subnet_type = optional(string)
}))
default = {}
}
variable "backup" {
description = "Map of backup variables"
type = object({
enabled = bool
rules = optional(map(object({
schedule = string
retention = number
completion_window = optional(number)
})), {})
})
default = {
enabled = false
}
validation {
condition = var.backup.enabled == true ? length(var.backup.rules) > 0 : true
error_message = "If backup is enabled, at least one rule must be defined in rules"
}
validation {
condition = var.backup.enabled == false ? length(var.backup.rules) == 0 : true
error_message = "If backup is disabled, rules must be empty"
}
}
variable "default_tags" {
description = "Default tags to apply to all resources"
type = map(string)
default = {}
}
variable "tag_environment" {
description = "The name of the environment to use in resource tagging"
type = string
}
variable "vpc_id" {
description = "The VPC to deploy into"
type = string
}
variable "default_availability_zone" {
description = "The default availability zone to deploy into"
type = string
default = ""
}
variable "environment_cidr" {
description = "The CIDR block of the environment. This block will be divided into public and private subnets for all AZs in the region"
type = string
}
variable "route53_zone_name" {
description = "The parent domain name to use for the instances created"
type = string
}
variable "route53_zone_id" {
description = "The Route53 zone ID to use for the instances created"
type = string
}
variable "key_name" {
description = "The name of the key pair to use for the instances created"
type = string
}
variable "additional_volumes" {
description = "Additional volumes to create and attach to the instances"
type = map(map(map(string)))
default = {}
}
variable "public_route_table_id" {
description = "Public route table ID to associate with new public subnets"
type = string
}
variable "private_route_table_id" {
description = "Private route table ID to associate with new private subnets"
type = string
}
variable "encrypt_volumes" {
description = "Flag to enable encryption of volumes"
type = bool
default = true
}
variable "allow_intra_environment_traffic" {
description = "Automatically attach a security group to instances to allow intra-environment traffic"
type = bool
default = true
}
variable "region" {
description = "The AWS region to deploy into"
type = string
default = null
}