Commit Graph

16 Commits

Author SHA1 Message Date
Krzysztof Wilczynski dd1d41ddce
Handle JSON parsing error in the ReadFunc for the access policies document.
Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2016-09-22 08:51:16 +01:00
Krzysztof Wilczynski d71ff1e122
Add JSON validation to the aws_elasticsearch_domain resource.
This commit adds support for new helper function which is used to
normalise and validate JSON string.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
2016-09-22 08:50:00 +01:00
stack72 ad4e580a03
provider/aws: Bump `aws_elasticsearch_domain` timeout values
Fixes #8541

The Update timeout and delete timeouts were a little short. Bumped them
to 60 mins and 90 mins respectively. I have been on the receiving of the
timeout for the Delete function
2016-09-06 08:52:07 +01:00
stack72 5504185770
provider/aws: Add DiffSupressionFunc to `aws_elasticsearch_domain`,
`aws_sqs_queue` and `aws_sns_topic`

```
SQS Queue Tests:
%make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSSQSQueue'
2 ↵ ✹
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/09/05 09:46:04 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSQSQueue
-timeout 120m
=== RUN   TestAccAWSSQSQueue_importBasic
--- PASS: TestAccAWSSQSQueue_importBasic (18.99s)
=== RUN   TestAccAWSSQSQueue_basic
--- PASS: TestAccAWSSQSQueue_basic (44.31s)
=== RUN   TestAccAWSSQSQueue_policy
--- PASS: TestAccAWSSQSQueue_policy (32.76s)
=== RUN   TestAccAWSSQSQueue_redrivePolicy
--- PASS: TestAccAWSSQSQueue_redrivePolicy (66.42s)
=== RUN   TestAccAWSSQSQueue_Policybasic
--- PASS: TestAccAWSSQSQueue_Policybasic (32.40s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    194.895s
```
SNS Topic Tests:

% make testacc TEST=./builtin/providers/aws
% TESTARGS='-run=TestAccAWSSNSTopic_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/09/04 22:56:26 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSSNSTopic_
-timeout 120m
=== RUN   TestAccAWSSNSTopic_importBasic
--- PASS: TestAccAWSSNSTopic_importBasic (17.67s)
=== RUN   TestAccAWSSNSTopic_basic
--- PASS: TestAccAWSSNSTopic_basic (17.92s)
=== RUN   TestAccAWSSNSTopic_policy
--- PASS: TestAccAWSSNSTopic_policy (20.99s)
=== RUN   TestAccAWSSNSTopic_withIAMRole
--- PASS: TestAccAWSSNSTopic_withIAMRole (26.51s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    83.112s
```
2016-09-05 11:46:23 +01:00
Paul Stack eaa48681d4 provider/aws: Refresh `aws_elasticsearch_domain` from state when ResourceNotFoundException (#8643)
* provider/aws: Refresh `aws_elasticsearch_domain` from state when
RecordNotFoundException

Fixes #3967

When an ElasticSearch domain has been deleted outside of Terraform, the
next Terraform operation would return the following:

```
* aws_elasticsearch_domain.curvelogic_es: ResourceNotFoundException:
* Domain not found: curvelogic-es
    status code: 409, request id: 6e4b2371-8e1a-11e5-bd07-7741b705d65c
```

We now refresh the resource from state when it is no longer found

* Update resource_aws_elasticsearch_domain.go
2016-09-03 14:55:29 +01:00
Paul Stack 744b266995 provider/aws: Support `aws_elasticsearch_domain` upgrades to (#7860)
`elasticsearch_version` 2.3

Fixes #7836
This will allow ElasticSearch domains to be deployed with version 2.3 of
ElasticSearch

The other slight modifications are to stop dereferencing values before
passing to d.Set in the Read func. It is safer to pass the pointer to
d.Set and allow that to dereference if there is a value

```
% make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSElasticSearchDomain_'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSElasticSearchDomain_ -timeout 120m
=== RUN   TestAccAWSElasticSearchDomain_basic
--- PASS: TestAccAWSElasticSearchDomain_basic (1611.74s)
=== RUN   TestAccAWSElasticSearchDomain_v23
--- PASS: TestAccAWSElasticSearchDomain_v23 (1898.80s)
=== RUN   TestAccAWSElasticSearchDomain_complex
--- PASS: TestAccAWSElasticSearchDomain_complex (1802.44s)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/aws	5313.006s
```

Update resource_aws_elasticsearch_domain.go
2016-08-05 08:59:15 +01:00
grayaii cb5062d237 Increase timeout yet again for aws elasticsearch resource
We create hundreds of AWS Elasticsearch resources over the last few months and we get occasional timeout failures from AWS.  This will PR is to increase the timeout once again. I did it before:
https://github.com/hashicorp/terraform/pull/5910/files
But we've seen enough timeouts from AWS on this resource that increasing the timeout seems like the only solution.
2016-08-03 16:39:28 +02:00
clint shryock b9f512e0cf provider/aws: Bump ElasticSearch domain delete time to match create time. Should help test pass 2016-06-06 11:13:48 -05:00
Alex Gray 50c050bb92 Elasticsearch times out. It takes a while to create. lets increase the timeout. 2016-03-29 15:58:40 -04: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
stack72 7b61567bf6 provider/aws: `aws_elastisearch_domain` tags not being set correctly.
The top level object was used not the tags within
2016-02-28 18:31:58 +00:00
Paul Tyng 0961033400 Add tag support for elasticsearch 2016-02-04 12:53:11 -05:00
Paul Tyng 20efc7688f Update validation on domain name 2016-02-04 12:53:10 -05:00
clint shryock 84fe0b15fd provider/aws: Update ElastiCache tests to verify delete
provider/aws: update elasticache search domain to only save access policies if not empty
2015-12-22 10:21:40 -06:00
Grisha Trubetskoy 6fbfd99ace Fix a bug whereby AWS elasticsearch domain access_policy will
always appear changed because of a missing normalizeJson().
2015-12-09 23:29:38 -05:00
Radek Simko 2b9f4f895e provider/aws: Add support for aws_elasticsearch_domain 2015-10-07 16:57:46 -07:00