-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
163 lines (138 loc) · 4.99 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
variable "create_table" {
description = "Controls if DynamoDB table and associated resources are created"
type = bool
default = true
}
variable "name" {
description = "Name of the DynamoDB table"
type = string
default = null
}
variable "attributes" {
description = "List of nested attribute definitions. Only required for hash_key and range_key attributes. Each attribute has two properties: name - (Required) The name of the attribute, type - (Required) Attribute type, which must be a scalar type: S, N, or B for (S)tring, (N)umber or (B)inary data"
type = list(map(string))
default = []
}
variable "hash_key" {
description = "The attribute to use as the hash (partition) key. Must also be defined as an attribute"
type = string
default = null
}
variable "range_key" {
description = "The attribute to use as the range (sort) key. Must also be defined as an attribute"
type = string
default = null
}
variable "billing_mode" {
description = "Controls how you are billed for read/write throughput and how you manage capacity. The valid values are PROVISIONED or PAY_PER_REQUEST"
type = string
default = "PAY_PER_REQUEST"
}
variable "write_capacity" {
description = "The number of write units for this table. If the billing_mode is PROVISIONED, this field should be greater than 0"
type = number
default = null
}
variable "read_capacity" {
description = "The number of read units for this table. If the billing_mode is PROVISIONED, this field should be greater than 0"
type = number
default = null
}
variable "point_in_time_recovery_enabled" {
description = "Whether to enable point-in-time recovery"
type = bool
default = false
}
variable "ttl_enabled" {
description = "Indicates whether ttl is enabled"
type = bool
default = false
}
variable "ttl_attribute_name" {
description = "The name of the table attribute to store the TTL timestamp in"
type = string
default = ""
}
variable "global_secondary_indexes" {
description = "Describe a GSI for the table; subject to the normal limits on the number of GSIs, projected attributes, etc."
type = any
default = []
}
variable "local_secondary_indexes" {
description = "Describe an LSI on the table; these can only be allocated at creation so you cannot change this definition after you have created the resource."
type = any
default = []
}
variable "replica_regions" {
description = "Region names for creating replicas for a global DynamoDB table."
type = any
default = []
}
variable "stream_enabled" {
description = "Indicates whether Streams are to be enabled (true) or disabled (false)."
type = bool
default = false
}
variable "stream_view_type" {
description = "When an item in the table is modified, StreamViewType determines what information is written to the table's stream. Valid values are KEYS_ONLY, NEW_IMAGE, OLD_IMAGE, NEW_AND_OLD_IMAGES."
type = string
default = null
}
variable "server_side_encryption_enabled" {
description = "Whether or not to enable encryption at rest using an AWS managed KMS customer master key (CMK)"
type = bool
default = false
}
variable "server_side_encryption_kms_key_arn" {
description = "The ARN of the CMK that should be used for the AWS KMS encryption. This attribute should only be specified if the key is different from the default DynamoDB CMK, alias/aws/dynamodb."
type = string
default = null
}
variable "tags" {
description = "A map of tags to add to all resources"
type = map(string)
default = {}
}
variable "timeouts" {
description = "Updated Terraform resource management timeouts"
type = map(string)
default = {
create = "10m"
update = "60m"
delete = "10m"
}
}
variable "autoscaling_enabled" {
description = "Whether or not to enable autoscaling. See note in README about this setting"
type = bool
default = false
}
variable "autoscaling_defaults" {
description = "A map of default autoscaling settings"
type = map(string)
default = {
scale_in_cooldown = 0
scale_out_cooldown = 0
target_value = 70
}
}
variable "autoscaling_read" {
description = "A map of read autoscaling settings. `max_capacity` is the only required key. See example in examples/autoscaling"
type = map(string)
default = {}
}
variable "autoscaling_write" {
description = "A map of write autoscaling settings. `max_capacity` is the only required key. See example in examples/autoscaling"
type = map(string)
default = {}
}
variable "autoscaling_indexes" {
description = "A map of index autoscaling configurations. See example in examples/autoscaling"
type = map(map(string))
default = {}
}
variable "table_class" {
description = "The storage class of the table. Valid values are STANDARD and STANDARD_INFREQUENT_ACCESS"
type = string
default = null
}