-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
r/aws_elasticsearch_domain: export kibana endpoint #2804
Conversation
@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 |
There was a problem hiding this 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/") |
There was a problem hiding this comment.
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?
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 |
|
@@ -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`. |
There was a problem hiding this comment.
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? :)
There was a problem hiding this comment.
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
8ec7dbe
to
7fbe25a
Compare
There was a problem hiding this 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
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. |
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! |
Fixes #2802
@fewknow, is this what you want, or rather export with
https://
scheme? Theendpoint
for elasticsearch domain itself is just a dns record, without any scheme.