-
Notifications
You must be signed in to change notification settings - Fork 122
Description
I am attempting to use this provider but i am having trouble with authenticating to my elasticsearch.
- I am firstly portforwarding elasticisearch
kubectl port-forward service/elasticsearch-prod-eck-elasticsearch-es-http 9200 -n elastic-system
- I then test connection locally using username and password - which works.
https://localhost:9200/
- But when i attempt to use terraform i get a tls error because its localhost.
provider "elasticstack" {
elasticsearch {
username = "elastic"
password = "<redacted>"
endpoints = ["https://localhost:9200"]
}
}
terraform apply
Error: tls: failed to verify certificate: x509: certificate is valid for elasticsearch-prod-eck-elasticsearch-es-http.elastic-system.es.local, elasticsearch-prod-eck-elasticsearch-es-http, elasticsearch-prod-eck-elasticsearch-es-http.elastic-system.svc, elasticsearch-prod-eck-elasticsearch-es-http.elastic-system, elasticsearch-prod-eck-elasticsearch-es-internal-http.elastic-system.svc, elasticsearch-prod-eck-elasticsearch-es-internal-http.elastic-system, *.elasticsearch-prod-eck-elasticsearch-es-default.elastic-system.svc, not localhost
How do i get around this issue so that i can make changes to the elasticsearch cluster in local development (i'm not yet ready to expose it via a lb).