-
Notifications
You must be signed in to change notification settings - Fork 34
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
base: main
Are you sure you want to change the base?
Conversation
First contribution to this provider, so apologies if there are any errors of form. This brings Go's Most of the code has been adapted from the If it only goes up to |
@austinvalle ping! |
Any updates? Can we get this merged? |
Hi @ricardbejarano! Thank you for submitting this PR. We understand why duration parsing like |
So... drawing from the This: resource "aws_sqs_queue" "terraform_queue" {
name = "terraform-example-queue"
delay_seconds = 90
message_retention_seconds = 86400
receive_wait_time_seconds = 10
// [...]
} Becomes this: resource "aws_sqs_queue" "terraform_queue" {
name = "terraform-example-queue"
delay_seconds = provider::time::parse_duration("1m30s")
message_retention_seconds = provider::time::parse_duration("24h")
receive_wait_time_seconds = provider::time::parse_duration("10s")
// [...]
} Can you point me to what's not clear? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I met with the maintainers of this repository and we decided that we will go ahead and accept this feature. Upon review, most of the code looks good with a few minor comments on some changes we would like that are mentioned in the suggestions. Most notably we would like to rename this function to duration_parse
to match our existing naming conventions. This change will subsequently require the renaming of the function, files and tests as well. Additionally, we require a changelog, there are instructions on how you can add one in the contributors guide. Once the changes have been made we can work on getting this PR merged, thank you again for your contribution.
Sounds good, I'll push the changes and write the changelog! |
I think this is all @rainkwan, let me know otherwise! |
Community Note