file-share/terraform/dlm.tf
Adam Moussa 7cb3f6510f
feat(infra): add HCP Terraform for the prod file share (PLAT-77)
The prod host will live on a subnet in the syslog VPC. The data volume stays unmanaged and is attached only after a snapshot copy.
2026-09-28 16:38:03 -04:00

29 lines
565 B
HCL

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 = ["INSTANCE"]
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
}
}
}