-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
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
I've searched GH issues for all open/closed referencing "timeadd" and found nothing matching this request.
Description
The timeadd() function should allow longer intervals to be specified. It is possible to say "60 days" by converting that into hours but a comment has to be left to make it clear why "1440h" was specified.
Use Case(s)
My specific use case was the deprecate_at parameter for the aws EBS builder:
deprecate_at = timeadd(timestamp(), "1440h") # 60d * 24h = 1440
While this works I believe it would be more clear as to intent if the duration added could be in days or months.
Potential configuration
I would suggest "d" for days and "M" or "mo" for months. ("d" is unused at the moment and "mo" might be more clear than the month/minute conflict of M vs m)
Potential References
https://developer.hashicorp.com/packer/docs/templates/hcl_templates/functions/datetime/timeadd
https://developer.hashicorp.com/packer/integrations/hashicorp/amazon/latest/components/builder/ebs
(search for deprecate_at)