generated from clowdhaus/terraform-aws-module-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
137 lines (118 loc) · 3.39 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
variable "name" {
type = string
description = "Node name prefix."
validation {
condition = length(var.name) >= 3
error_message = "Name must be at least 3 characters long."
}
}
variable "size" {
type = number
description = "Number of nodes to create. Will only be used if vm_names is empty."
default = 1
validation {
condition = var.size >= 0
error_message = "Size must be a positive number."
}
}
variable "vm_names" {
type = list(string)
description = "List of names for the VMs. to create"
default = []
}
variable "image" {
type = string
description = "Node image name."
default = "debian-12"
}
variable "location" {
type = string
description = "Node location."
validation {
condition = contains(["fsn1", "nbg1", "hel1", "ash", "hil", "sin"], lower(var.location))
error_message = "Unsupported location."
}
}
variable "instance_type" {
type = string
description = "Node instance type."
default = "cx22"
validation {
condition = contains(["cx11", "cx21", "cx22", "cx31", "cx32", "cx41", "cx42", "cx51", "cx52", "cpx11", "cpx21", "cpx31", "cpx41", "cpx51", "ccx12", "ccx22", "ccx32", "ccx42", "ccx52", "ccx62", "ccx13", "ccx23", "ccx33", "ccx43", "ccx53", "ccx63", "cax11", "cax21", "cax31", "cax41"], lower(var.instance_type))
error_message = "Unsupported server type."
}
}
variable "volumes" {
type = list(object({
name = string
size = number
format = optional(string, "ext4")
}))
description = "Extra Hetzer volumes added to each server."
default = []
}
variable "ssh_keys" {
type = list(string)
description = "Nodes public ssh keys ids or names or the key itself. If its the key you have to set create_ssh_keys."
default = []
}
variable "create_ssh_keys" {
type = bool
description = "Hetzner allows create a ssh key only once. By default you have to create them before. If you set this flag the module will create them."
default = false
}
variable "shutdown_before_deletion" {
type = bool
description = "Will issue a shutdown command before deleting the server."
default = false
}
variable "tags" {
type = any
description = "Node tags/labels"
default = {}
}
variable "backups" {
type = bool
description = "Backups enabled"
default = false
}
variable "fixed_disk_size" {
type = bool
description = "Whether the disk size should also be upgraded when scaling up. If true, downgrades may not be possible anymore."
default = false
}
variable "user_data" {
type = string
description = "Node user data (cloud-init)"
default = null
}
variable "public_ipv4" {
type = bool
description = "Node public ipv4 ip"
default = true
}
variable "public_ipv6" {
type = bool
description = "Node public ipv6 ip"
default = true
}
variable "network_name" {
type = string
description = "Node network name"
default = null
}
variable "private_ip_addresses" {
type = list(string)
description = "Node private ips. Network name must be set for this."
default = []
}
variable "snapshot_image" {
type = bool
description = "Node image is snapshot"
default = false
}
variable "firewall_ids" {
type = list(string)
description = "Ids of firewall attacted to the server"
default = null
}