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

function/parse_duration: Add duration parsing function #350

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ricardbejarano
Copy link

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment 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 pull request followers and do not help prioritize the request

@ricardbejarano ricardbejarano requested a review from a team as a code owner September 4, 2024 11:18
@ricardbejarano
Copy link
Author

First contribution to this provider, so apologies if there are any errors of form.

This brings Go's time.ParseDuration function to Terraform, allowing users to define durations as "1h30m" instead of 60*90, which is much more readable.

Most of the code has been adapted from the rfc3339_parse function.

If it only goes up to hours in resolution is because that's what Rob Pike said makes sense.

@ricardbejarano
Copy link
Author

@austinvalle ping!

@ricardbejarano
Copy link
Author

Any updates? Can we get this merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant