-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
49 lines (42 loc) · 1.06 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
# Variables declaration
variable "all_tags" {
description = "Global tags for each resource"
type = map(string)
default = {}
}
variable "domain" {
description = "Full resources name suffix"
type = string
nullable = true
default = ""
}
variable "algorithm" {
description = <<-DESCR
Name of the algorithm to use when generating the private key
Module supported algorithms are: ED25519 and RSA.
DESCR
type = string
nullable = false
default = "ED25519"
validation {
condition = (try(
var.algorithm != null) &&
contains(["ED25519", "RSA"], var.algorithm)
)
error_message = "Module supported algorithms 'ED25519' and 'RSA'!"
}
}
variable "rsa_bits" {
description = "The size of the generated RSA key"
type = number
nullable = true
default = 4096
validation {
condition = (
try(var.rsa_bits == 2048) ||
try(var.rsa_bits == 3072) ||
try(var.rsa_bits == 4096)
)
error_message = "Key size can be 2048, 3072 or 4096 bits (default: 4096)!"
}
}