Commit Graph

4 Commits

Author SHA1 Message Date
Hector Rivas Gandara eb4fef1ca1 aws provider: normalize json of cloudwatch event_pattern
Normalise the event_pattern of the aws_cloudwatch_event_rule resource

before uploading it to AWS.



AWS seems to accept a event_pattern with a JSON with new lines, but then

the rule does not seem to work. Creating the rule in the AWS console works,

but will setup the pattern  as a json without newlines or spaces, and

display a formatted JSON.
2016-04-05 15:56:45 -05:00
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 de656942ae provider/aws: Fix all pointer RetryError returns
All of these RetryErrors were meant to fail right away, but instead
caused retry looping because the typecheck in the implementation of
`resource.Retry()` only catches the value type, and not the pointer
type.

Refs #5537
2016-03-09 14:59:55 -06:00
Radek Simko ab89e5e528 provider/aws: Add CloudWatch Event Rule 2016-02-13 13:21:32 +00:00