mirror of
https://github.com/Sea-Haven-Industries/file-share.git
synced 2026-10-03 18:53:16 +00:00
30 lines
563 B
Terraform
30 lines
563 B
Terraform
|
|
resource "aws_dlm_lifecycle_policy" "nightly" {
|
||
|
|
description = "Nightly EBS snapshots for file share"
|
||
|
|
execution_role_arn = local.dlm_service_role_arn
|
||
|
|
state = "ENABLED"
|
||
|
|
|
||
|
|
policy_details {
|
||
|
|
resource_types = ["VOLUME"]
|
||
|
|
|
||
|
|
target_tags = {
|
||
|
|
"file-share-backup" = "true"
|
||
|
|
}
|
||
|
|
|
||
|
|
schedule {
|
||
|
|
name = "file-share-nightly"
|
||
|
|
|
||
|
|
create_rule {
|
||
|
|
interval = 24
|
||
|
|
interval_unit = "HOURS"
|
||
|
|
times = ["06:00"]
|
||
|
|
}
|
||
|
|
|
||
|
|
retain_rule {
|
||
|
|
count = 30
|
||
|
|
}
|
||
|
|
|
||
|
|
copy_tags = true
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|