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

r/aws_elasticsearch_domain: export kibana endpoint #2804

Merged

Conversation

loivis
Copy link
Contributor

@loivis loivis commented Dec 29, 2017

Fixes #2802

@fewknow, is this what you want, or rather export with https:// scheme? The endpoint for elasticsearch domain itself is just a dns record, without any scheme.

@jen20 jen20 added the enhancement Requests to existing resources that expand the functionality or scope. label Dec 31, 2017
@fewknow
Copy link

fewknow commented Jan 2, 2018

@loivis looks like this will satisfy my use case. I just wanted to be able to assign DNS to this in terraform so my end users can hit kibana.dev.corvestacloud.net.

Thanks

Copy link
Contributor

@Ninir Ninir left a comment

Choose a reason for hiding this comment

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

Hi @loivis

We need to also add the related documentation and a related test check: we need to ensure that this attribute is well set, but with the correct value!

Thanks for the work! 🚀

@@ -480,12 +484,14 @@ func resourceAwsElasticSearchDomainRead(d *schema.ResourceData, meta interface{}
if err != nil {
return err
}
d.Set("kibana_endpoint", endpoints["vpc"].(string)+"/_plugin/kibana/")
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we make use of a function that build this endpoint for us here and below?

@loivis
Copy link
Contributor Author

loivis commented Jan 4, 2018

Hi @Ninir

I added documentation for the attribute and extracted the function to populate kibana endpoint.

Regarding test, I just add simple check in acceptance test. Not sure if we need this check when setting the attribute. It is only basic string concatenation of endpoint attribute and /_plugin/kibana/

@loivis
Copy link
Contributor Author

loivis commented Jan 4, 2018

⎇  make testacc TEST=./aws TESTARGS='-run=TestAccAWSElasticSearchDomain_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSElasticSearchDomain_basic -timeout 120m
=== RUN   TestAccAWSElasticSearchDomain_basic
--- PASS: TestAccAWSElasticSearchDomain_basic (870.58s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	870.636s

@@ -109,6 +109,7 @@ The following attributes are exported:
* `arn` - Amazon Resource Name (ARN) of the domain.
* `domain_id` - Unique identifier for the domain.
* `endpoint` - Domain-specific endpoint used to submit index, search, and data upload requests.
* `kibana_endpoint` - Domain-specific endpoint for kibana without https scheme, the same as `endpoint`.
Copy link
Contributor

Choose a reason for hiding this comment

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

By "the same as endpoint", do you mean the same as in "without https"?
If so, I think this is misleading with the beginning of the sentence, what do you think? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exactly. Now removed those confusing words.

add documentation;
extract function to get kibana endpoint
@loivis loivis force-pushed the 2802-elasticsearch-domain-export-kibana-endpoint branch from 8ec7dbe to 7fbe25a Compare January 4, 2018 16:17
Copy link
Contributor

@Ninir Ninir left a comment

Choose a reason for hiding this comment

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

Hey @loivis

LGTM, thanks!

$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSElasticSearchDomain_basic'      

==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -run=TestAccAWSElasticSearchDomain_basic -timeout 120m
=== RUN   TestAccAWSElasticSearchDomain_basic
--- PASS: TestAccAWSElasticSearchDomain_basic (907.23s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	907.296s

@Ninir Ninir merged commit 10d502a into hashicorp:master Jan 10, 2018
@bflad bflad added this to the v1.7.0 milestone Jan 12, 2018
@bflad
Copy link
Contributor

bflad commented Jan 12, 2018

This has been released in terraform-provider-aws version 1.7.0. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

@loivis loivis deleted the 2802-elasticsearch-domain-export-kibana-endpoint branch January 30, 2018 20:15
@ghost
Copy link

ghost commented Apr 8, 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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kibana Attribute Not available for elasticsearch
5 participants