Commit Graph

10 Commits

Author SHA1 Message Date
Paul Hinze
108ccf0007 builtin: Refactor resource.Retry to clarify return
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.
2016-03-09 17:37:56 -06:00
Paul Hinze
be59831847 mailgun: poll until domain destroy takes effect
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.
2016-01-21 09:51:08 -06:00
Paul Hinze
86af71ad6d providers/mailgun: fix sending/receiving records
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.
2015-02-18 17:18:19 -06:00
Sander van Harmelen
4ace4865d7 Making all function names consistent
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…
2014-12-15 15:26:17 +01:00
Jack Pearkes
7cfad67920 providers/mailgun: remove dedebugging 2014-08-29 13:36:26 -07:00
Jack Pearkes
96c481578f providers/mailgun: save domain records 2014-08-29 11:39:06 -07:00
Jack Pearkes
02c93f0aea providers/mailgun: return domain response instead of domain
see also 5b02e7e9ff
2014-08-29 11:15:14 -07:00
Jack Pearkes
b79834e859 providers/mailgun: smtp_password is required, no need for pub api key 2014-08-25 10:09:50 -07:00
Jack Pearkes
b71ff28871 providers/mailgun: smtp_password is required 2014-08-25 10:09:50 -07:00
Jack Pearkes
e3d54cb487 providers/mailgun: initial commit 2014-08-25 10:09:50 -07:00