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
|
variable "volumes" {
description = "Map of EBS volumes to create"
type = map(object({
availability_zone = string
size = number
type = optional(string, "gp3")
iops = optional(number, null)
throughput = optional(number, null)
encrypted = optional(bool, true)
kms_key_id = optional(string, null)
multi_attach_enabled = optional(bool, false)
snapshot_id = optional(string, null)
final_snapshot = optional(bool, false)
# Attachment
instance_name = optional(string, null) # data lookup key
device_name = optional(string, null)
force_detach = optional(bool, false)
}))
default = {}
}
variable "dlm_policy_name" {
description = "Name for the Data Lifecycle Manager policy"
type = string
default = "ebs-snapshot-policy"
}
variable "dlm_execution_role_arn" {
description = "ARN of the IAM role for DLM (optional — creates role when null)"
type = string
default = null
}
variable "snapshot_schedules" {
description = "Map of DLM snapshot schedules"
type = map(object({
name = string
interval = optional(number, 24)
interval_unit = optional(string, "HOURS")
times = optional(list(string), ["03:00"])
retain_count = optional(number, 7)
target_tags = map(string)
}))
default = {}
}
variable "tags" {
description = "Resource tags to apply to all resources"
type = map(string)
default = {}
}
|