Change the `RetryFunc` from a plain `error` return type to a
specialized `RetryError` which must decide whether it is
retryable or not.
Add `RetryableError` / `NonRetryableError` factory functions that
callers are meant to use to build up these errors.
This makes it eminently clear whether or not a given error is
retryable from inside the client code.
Goal here is to _not_ change any behavior, simply reflect the
existing behavior with the new, clearer, API.
Test failures indicate that this operation doesn't always take effect
immediately:
https://travis-ci.org/hashicorp/terraform/builds/103764466
Add a simple poll to retry a few times until it does.
```
--- PASS: TestAccMailgunDomain_Basic (1.51s)
```
Verified that this does the trick by looping the test and watching the
logs for the retry behavior to kick in.
The Mailgun provider was relying on an old behavior of
`ResourceData.Set` that would allow nested access to
maps. We now just build up our own maps like sane people.
Before all providers were using the helper.Schema approach the helper
function had these names. Now they all use names consistent with the Go
naming conventions except for these last few…