Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

provider/aws: Support aws_elasticsearch_domain upgrades to elasticsearch_version 2.3 #7860

Merged
merged 1 commit into from
Aug 5, 2016

Conversation

stack72
Copy link
Contributor

@stack72 stack72 commented Jul 29, 2016

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

@stack72
Copy link
Contributor Author

stack72 commented Jul 29, 2016

Depends on #7857

d.Set("domain_id", *ds.DomainId)
d.Set("domain_name", *ds.DomainName)
d.Set("domain_id", ds.DomainId)
d.Set("do main_name", ds.DomainName)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there might be a space here in the property name.

@radeksimko radeksimko added the waiting-response An issue/pull request is waiting for a response from the community label Jul 29, 2016
@Zordrak
Copy link

Zordrak commented Aug 2, 2016

Crying out for a pull here...

@radeksimko
Copy link
Member

@stack72 would you mind rebasing this + resolving conflicts, so we can get it merged? 😉

I reckon the conflict was caused by #7944 and #7857

@stack72
Copy link
Contributor Author

stack72 commented Aug 4, 2016

@radeksimko over to you sir :)

@@ -207,7 +215,11 @@ func resourceAwsElasticSearchDomainCreate(d *schema.ResourceData, meta interface
d.SetId(*out.DomainStatus.ARN)

log.Printf("[DEBUG] Waiting for ElasticSearch domain %q to be created", d.Id())
<<<<<<< HEAD

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you forgot some merge conflicts here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot - would have been good if i had actually pushed the changes :)

`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
@stack72 stack72 removed the waiting-response An issue/pull request is waiting for a response from the community label Aug 5, 2016
"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform/terraform"
)

func TestAccAWSElasticSearchDomain_basic(t *testing.T) {
var domain elasticsearch.ElasticsearchDomainStatus
ri := acctest.RandInt()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@radeksimko
Copy link
Member

LGTM

$ make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSElasticSearchDomain_'
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSElasticSearchDomain_ -timeout 120m
=== RUN   TestAccAWSElasticSearchDomain_basic
--- PASS: TestAccAWSElasticSearchDomain_basic (1609.44s)
=== RUN   TestAccAWSElasticSearchDomain_v23
--- PASS: TestAccAWSElasticSearchDomain_v23 (1597.24s)
=== RUN   TestAccAWSElasticSearchDomain_complex
--- PASS: TestAccAWSElasticSearchDomain_complex (1819.84s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    5026.551s

@radeksimko radeksimko merged commit 744b266 into master Aug 5, 2016
@radeksimko radeksimko deleted the aws-es-2.3 branch August 5, 2016 07:59
@ghost
Copy link

ghost commented Apr 23, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need ElasticSearch 2.3 support
5 participants