Closed hongkongkiwi closed 3 months ago
Oh I just realised also that "failure" is currently undocumented for resource :)
As is said in https://github.com/magodo/terraform-provider-restful/issues/108#issuecomment-2275868342, I'm refrained to introduce the multiple success statuses. Also, failure
is omit by design, which represents all statuses other than success
+ pending
.
With this, I'm gonna close this issue.
What I mean is that "failure" option of poll is not in the docs, but it is in your examples here:
It might be good add it to the documentation if it's a valid option that can be used or remove it if it shouldn't be used.
@hongkongkiwi Thank you for pointing this out! Will update the example then.
Updated in https://github.com/magodo/terraform-provider-restful/commit/83a751b4c1790325bbff20539c54c2c23f008f9b
Is it possible to change the "success" & "failure" in the *_poll params to an array? e.g.
and it could work well for body also (this is a bad example but imagine another case where it could be a couple of different strings to indicate success):
The only downside is that this is a breaking change as single values now need to be a single value array, but it keeps it consistent across success, pending, failure values and allows a bit more flexibility.