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: support other time intervals #14832

Closed
djmetzle opened this issue Aug 25, 2020 · 5 comments · Fixed by #23880
Closed

aws_dlm_lifecycle_policy: support other time intervals #14832

djmetzle opened this issue Aug 25, 2020 · 5 comments · Fixed by #23880
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/dlm Issues and PRs that pertain to the dlm service. upstream Addresses functionality related to the cloud provider.
Milestone

Comments

@djmetzle
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

The aws_dlm_lifecycle_policy resource only supports the HOURS interval specficiation.

https://github.com/terraform-providers/terraform-provider-aws/blob/11301c1356f6e76b07e895c0b41a326a0fabc080/aws/resource_aws_dlm_lifecycle_policy.go#L75-L82

See the docs here:
https://github.com/terraform-providers/terraform-provider-aws/blob/1d896f5b6e3ec9cbb8aedeb947b8cec275e3f25f/website/docs/r/dlm_lifecycle_policy.markdown#create-rule-arguments

It mentions:

interval_unit - (Optional) The unit for how often the lifecycle policy should be evaluated. HOURS is currently the only allowed value and also the default value.

The go sdk does support other intervals though:

https://github.com/aws/aws-sdk-go/blob/fde575c64841b291899bc112dfcdc206f609a305/service/dlm/api.go#L2505-L2517

Along with the only currently allowed value:
https://github.com/aws/aws-sdk-go/blob/fde575c64841b291899bc112dfcdc206f609a305/service/dlm/api.go#L2465-L2468


It would be useful to fully use the capabilities of DLM from this Terrafrom module.

Unfortunately, the AWS docs do not mention the other schedule intervals, so perhaps i'm misreading here:
https://docs.aws.amazon.com/dlm/latest/APIReference/API_CreateRule.html#dlm-Type-CreateRule-IntervalUnit

New or Affected Resource(s)

  • aws_dlm_lifecycle_policy
@djmetzle djmetzle added the enhancement Requests to existing resources that expand the functionality or scope. label Aug 25, 2020
@ghost ghost added the service/dlm Issues and PRs that pertain to the dlm service. label Aug 25, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Aug 25, 2020
@breathingdust breathingdust removed the needs-triage Waiting for first response or review from a maintainer. label Sep 16, 2021
@anGie44 anGie44 self-assigned this Nov 10, 2021
@anGie44
Copy link
Contributor

anGie44 commented Nov 10, 2021

Hi @djmetzle, thank you for raising this feature request. At this time, it seems the creation rule via the create_rule configuration block still only supports the HOURS intervalUnit but the retain rule on the other hand does support additional interval Units as you've referenced in the API specs (also available here: https://docs.aws.amazon.com/dlm/latest/APIReference/API_RetainRule.html) . the aws_dlm_lifecycle_policy resource does not currently have configurable interval and interval_unit values , so if that is still along the lines of this request, we can definitely support those changes via #11503.

@anGie44 anGie44 added the upstream Addresses functionality related to the cloud provider. label Nov 10, 2021
@anGie44 anGie44 removed their assignment Nov 10, 2021
@denzhel
Copy link

denzhel commented Feb 10, 2022

Any update on this ?

We really want to use this resource to create a DLM with 3 different policies:

  • Daily
  • Weekly
  • Monthly

The limitation of hours and maximum of 24 is VERY limiting and forces us to use scripts or other hacks.

Will you improve the usability any time soon ? @anGie44 @djmetzle

@danielbeardsley
Copy link

At this time, it seems the creation rule via the create_rule configuration block still only supports the HOURS intervalUnit

True, but it looks like AWS now supports arbitrary schedules via the CronExpression rule:
https://docs.aws.amazon.com/dlm/latest/APIReference/API_CreateRule.html

See issue #13627

@github-actions
Copy link

github-actions bot commented Apr 7, 2022

This functionality has been released in v4.9.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented May 8, 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 8, 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. upstream Addresses functionality related to the cloud provider.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants