-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
113 lines (98 loc) · 3.01 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
variable "name" {
description = "Specifies the instance name"
type = string
nullable = false
}
variable "name_postfix" {
description = "Specifies the instance name postfix"
type = string
default = null
}
variable "description" {
description = "Specifies the description of an instance"
type = string
default = null
}
variable "region" {
description = "Specifies the region in which to create the resource, if omitted, the provider-level region will be used"
type = string
default = null
}
variable "availability_zones" {
description = "Specifies the AZ name, if omitted, AZ calculates automatically"
type = list(string)
default = []
validation {
condition = length(var.availability_zones) <= 1
error_message = "Redis Single instance needs only one availability zone."
}
}
variable "engine_version" {
description = "Specifies the version of a Redis engine"
type = string
default = "5.0"
validation {
condition = contains(["4.0", "5.0", "6.0"], var.engine_version)
error_message = "The value can be 4.0, 5.0 or 6.0."
}
}
variable "capacity" {
description = "Specifies the cache capacity in GB"
type = number
default = 0.5
validation {
condition = contains([0.125, 0.25, 0.5, 1, 2, 4, 8, 16, 32, 64], var.capacity)
error_message = "Valid values are 0.125, 0.25, 0.5, 1, 2, 4, 8, 16, 32, 64."
}
}
variable "vpc_id" {
description = "Specifies the VPC ID"
type = string
nullable = false
}
variable "subnet_id" {
description = "Specifies the network ID of a subnet"
type = string
nullable = false
}
variable "port" {
description = "Specifies the Redis port"
type = number
default = 6379
}
variable "password" {
description = <<DES
Specifies the password of a DCS instance. Changing this creates a new instance.
The password of a DCS instance must meet the following complexity requirements:
* Must be a string of 8 to 32 bits in length;
* Must contain three combinations of the following four characters: Lower case
letters, uppercase letter, digital, Special characters include (`~!@#$^&*()-_=+\|{}:,<.>/?);
* The new password cannot be the same as the old password.
DES
type = string
default = null
}
variable "whitelist_enable" {
description = "Enable or disable the IP address whitelists"
type = bool
default = true
}
variable "whitelist" {
description = "Specifies the IP addresses which can access the instance"
type = map(list(string))
default = {}
}
variable "tags" {
description = "Specifies the key/value pairs to associate with the Redis Instance"
type = map(string)
default = {}
}
variable "cpu_architecture" {
description = "The CPU architecture of cache instance"
type = string
default = "x86_64"
validation {
condition = contains(["x86_64", "aarch64"], var.cpu_architecture)
error_message = "Valid values are x86_64, aarch64"
}
}