phillbaker / terraform-provider-elasticsearch

An elasticsearch provider for terraform
https://registry.terraform.io/providers/phillbaker/elasticsearch
Mozilla Public License 2.0
303 stars 133 forks source link

The argument "url" is required, but was not set. #355

Open jinxiao opened 12 months ago

jinxiao commented 12 months ago

When I tried to use terraform plan and terraform apply, it reported The argument "url" is required, but was not set.

Terraform v1.5.2
on linux_amd64
+ provider registry.terraform.io/carlpett/sops v0.7.2
+ provider registry.terraform.io/hashicorp/aws v4.28.0
+ provider registry.terraform.io/hashicorp/helm v2.7.1
+ provider registry.terraform.io/hashicorp/kubernetes v2.18.1
+ provider registry.terraform.io/hashicorp/time v0.9.1
+ provider registry.terraform.io/phillbaker/elasticsearch v2.0.7

I found the same issue here: https://github.com/phillbaker/terraform-provider-elasticsearch/issues/221 But when I have upgraded the version to 1.5.2, the problem is still there. Please help.

excalq commented 11 months ago

With Terraform 1.4.6 and phillbaker/elasticsearch 2.0.7, this is still broken. The ELASTICSEARCH_URL env workaround does not work. (The target is OpenSearch 2.5)

vishnu-techprescient-teika commented 5 months ago

I am also encountering the same issue, my version details

Terraform v1.4.5
on linux_amd64
+ provider registry.terraform.io/datadog/datadog v3.10.0
+ provider registry.terraform.io/hashicorp/archive v2.2.0
+ provider registry.terraform.io/hashicorp/aws v4.8.0
+ provider registry.terraform.io/hashicorp/null v3.1.1
+ provider registry.terraform.io/hashicorp/random v3.1.3
+ provider registry.terraform.io/opensearch-project/opensearch v2.2.0
+ provider registry.terraform.io/phillbaker/elasticsearch v2.0.6

I am using it with Opensearch version 1.6 but getting error:

╷
│ Error: Missing required argument
│ 
│ The argument "url" is required, but was not set.

In my trials I have used the env var - ELASTICSEARCH_URL and also at one point provider asked for url itself:

terraform apply
provider.elasticsearch.url
  Elasticsearch URL

  Enter a value: https://<url>.us-east-1.es.amazonaws.com/

But still got the same error. Please help.