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

AWS ElasticSearch Custom endpoint support #16059

Closed
nnovaes opened this issue Nov 5, 2020 · 5 comments · Fixed by #16192
Closed

AWS ElasticSearch Custom endpoint support #16059

nnovaes opened this issue Nov 5, 2020 · 5 comments · Fixed by #16192
Assignees
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/elasticsearch Issues and PRs that pertain to the elasticsearch service.
Milestone

Comments

@nnovaes
Copy link
Contributor

nnovaes commented Nov 5, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Add support for AWS ElasticSearch custom endpoint

New or Affected Resource(s)

  • aws_elasticsearch_domain

Potential Terraform Configuration

References

https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/es-customendpoint.html

  • #0000
@nnovaes nnovaes added the enhancement Requests to existing resources that expand the functionality or scope. label Nov 5, 2020
@ghost ghost added the service/elasticsearch Issues and PRs that pertain to the elasticsearch service. label Nov 5, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Nov 5, 2020
@ewbankkit
Copy link
Contributor

Announcement.

Requires AWS SDK v1.35.22:

Potential syntax:

resource "aws_elasticsearch_domain" "example" {
  domain_endpoint_options {
    custom_endpoint_enabled         = true
    custom_endpoint                 = "example.com"
    custom_endpoint_certificate_arn = aws_acm_certificate.example.arn
  }
}

@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Nov 7, 2020
@matiaszilli
Copy link
Contributor

Hi @ewbankkit. I can try to implement it. 😃

@tdmalone
Copy link
Contributor

Current workaround:

resource "null_resource" "custom_endpoint" {
  provisioner "local-exec" {
    command = <<-EOF
      # Some settings here are duplicated from the ones set natively, so that we don't overwrite them.
      aws es update-elasticsearch-domain-config \
        --domain-name "${aws_elasticsearch_domain.main.domain_name}" \
        --domain-endpoint-options '{
          "EnforceHTTPS": ${aws_elasticsearch_domain.main.domain_endpoint_options.0.enforce_https},
          "TLSSecurityPolicy": "${aws_elasticsearch_domain.main.domain_endpoint_options.0.tls_security_policy}",
          "CustomEndpointEnabled": true,
          "CustomEndpoint": "${local.hostname}",
          "CustomEndpointCertificateArn": "${aws_acm_certificate.custom_endpoint.arn}"
        }'
    EOF
  }
}

@bflad bflad self-assigned this Mar 31, 2021
@github-actions github-actions bot added this to the v3.35.0 milestone Mar 31, 2021
@ghost
Copy link

ghost commented Apr 1, 2021

This has been released in version 3.35.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented May 1, 2021

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 as resolved and limited conversation to collaborators May 1, 2021
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. service/elasticsearch Issues and PRs that pertain to the elasticsearch service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants