Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws_dlm_lifecycle_policy | data lifecycle manager rules interval #23939

Closed
abheeshtan opened this issue Mar 30, 2022 · 2 comments
Closed

aws_dlm_lifecycle_policy | data lifecycle manager rules interval #23939

abheeshtan opened this issue Mar 30, 2022 · 2 comments
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/dlm Issues and PRs that pertain to the dlm service.

Comments

@abheeshtan
Copy link

Hi,

Not sure if this was reported already, but I am having trouble following page at https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dlm_lifecycle_policy#interval_unit

when it comes to dlm create rule it allows only interval type to Hours. Which makes it difficult to set rules for weekly backup using terraform.

AWS allows the users to set rules for daily, weekly and cron type of interval.
Current Terraform Version

terraform version: Terraform 0.13+
provider version: 4.8.0
Use-cases

Eg:

resource "aws_dlm_lifecycle_policy" "example" {
description = "example DLM lifecycle policy"
execution_role_arn = aws_iam_role.dlm_lifecycle_role.arn
state = "ENABLED"

policy_details {
resource_types = ["VOLUME"]

schedule {
  name = "2 weeks of daily snapshots"

  create_rule {
    interval      = 24
    **interval_unit = "HOURS"**              # HOURS is currently the only allowed value and also the default value
    times         = ["23:45"]
  }

  retain_rule {
    count = 14
  }

  tags_to_add = {
    SnapshotCreator = "DLM"
  }

  copy_tags = false

  cross_region_copy_rule {
    target    = "us-west-2"
    encrypted = true
    cmk_arn   = aws_kms_key.dlm_cross_region_copy_cmk.arn
    copy_tags = true
    retain_rule {
      interval      = 30
      interval_unit = "DAYS"
    }
  }
}

target_tags = {
  Snapshot = "true"
}

}
}

Proposal

Requesting the team to add the days and cron type interval for dlm rules, helps in solving issues

@abheeshtan abheeshtan added the enhancement Requests to existing resources that expand the functionality or scope. label Mar 30, 2022
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. service/dlm Issues and PRs that pertain to the dlm service. labels Mar 30, 2022
@justinretzolk
Copy link
Member

Hey @abheeshtan 👋 Thank you for taking the time to raise this! Fortunately, a PR was recently merged (#23880) that introduces (among other things) the cron_expression argument that you're looking for. This will be released in the next version of the provider, version 4.9.0. With that in mind, I'll close this issue. If you feel I've done this in error, please do let me know.

@github-actions github-actions bot removed the needs-triage Waiting for first response or review from a maintainer. label Mar 31, 2022
@github-actions
Copy link

github-actions bot commented May 5, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/dlm Issues and PRs that pertain to the dlm service.
Projects
None yet
Development

No branches or pull requests

2 participants