-
Notifications
You must be signed in to change notification settings - Fork 99
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
[Bug] Subsequent terraform apply fail to connect to deployment's endpoint #370
Comments
+1. I ran into the same issue yesterday. |
I have the same issue here with message: Versions:
|
I managed to find a workaround. If there is only one elasticsearch deployment, then you can set the ELASTICSEARCH_ENDPOINTS variable to the elastic cloud elasticsearch https endpoint. This fixes the connection refused error in terraform plan. |
For me this workaround worked: data "ec_deployment" "ec" {
id = module.ElasticCloud.id
}
provider "elasticstack" {
# Use our Elastic Cloud deployment outputs for connection details.
# This also allows the provider to create the proper relationships between the two resources.
elasticsearch {
endpoints = [data.ec_deployment.ec.elasticsearch[0].https_endpoint]
username = module.ElasticCloud.elastic_username_output
password = module.ElasticCloud.elastic_password_output
}
} |
I too am experiencing this. Initial apply worked but subsequent give
|
fixed in https://github.com/elastic/terraform-provider-ec/ 0.8.0 |
0.8.0 working for me |
Describe the bug
When using a combination of the ec provider and the elasticstack provider, runs after the initial apply fail with connection issues, as the endpoint is replaced with the default (
localhost:9200
):This is likely a consequence of elastic/terraform-provider-ec#599 as I cannot reproduce the bug with terraform <1.4 (tested with 1.3.0 and 1.3.9)
To Reproduce
Steps to reproduce the behavior:
terraform plan
,terraform apply
Expected behavior
The same terraform plan runs without issues in 1.3.9:
Versions (:
Additional context
As mentioned above, I believe this is caused by the configuration drift reported in elastic/terraform-provider-ec#599
The text was updated successfully, but these errors were encountered: