feature request: user configurable retryable errors
Hi,
I would like to propose that the resources contained within this provider have an additional schema property to identify retryable errors.
With any complex cloud infrastructure, retryable errors are a fact of life. We could make our customers' lives easier by allowing them (and module authors) the ability to configure retries.
Inspiration: https://pkg.go.dev/github.com/cenkalti/backoff
Proposed configuration
resource "azapi_resource" "example" {
# usual resource properties
# Retry configuration
retry {
interval_seconds = 5 # mandatory
randomization_factor = 0.5 # optional, default is 0.5
multiplier = 2 # optional, default is 2
error_message_regex = [
"my error message",
"end of error message$"
]
}
# Retry will continue up to configured timeouts
timeouts {
create = "10m"
}
}
@lonegunmanb would be great to get your thoughts on this based on our recent conversations!
Thanks for asking @matt-FFFFFF , I would like to add max_attempts and max_interval.
max_attempts is easy to understand, but if the multiplier is big, it might lead a too long interval that makes this exponential backoff unreasonable, in that case would a max_interval solve this issue?
This seems a sensible suggestion 👍
Just adding a comment in support of this idea!
Hi @ms-henglu I have started work on this. Hope that's ok?
@matt-FFFFFF @ms-henglu who will be working on seeing this completion? Just want to clarify so that we make sure the work doesn't sit idle.
I'm happy to take this on. ETA end of August.
That's great! Thank you @matt-FFFFFF !