Closed ShahroZafar closed 1 year ago
Hello, what steps have you taken so far to debug the issue? The error message is descriptive in this case: the provider does not have permission to access the cluster. You can also search this repository for similar issues in the past: https://github.com/phillbaker/terraform-provider-elasticsearch/issues?q=is%3Aissue+403
Please include the following information:
Note: Issues on this repository are for reporting bugs and feature requests for this provider, not providing support for unique environments. In order to investigate this, a reproducible case should be provided, if that can't be provided, we'll have to close this issue to focus on widely impacting issues.
Hi @phillbaker - i am having the same issue getting forbidden error on creating snapshot repository - i had no issue adding ISM policy to the domain and mapping policy to indices but when I try adding snapshot repository I get forbidden error:
Error: elastic: Error 403 (Forbidden) │ │ with elasticsearch_snapshot_repository.sample_snapshot_repository, │ on policy.tf line 2, in resource "elasticsearch_snapshot_repository" "sample_snapshot_repository": │ 2: resource "elasticsearch_snapshot_repository" "sample_snapshot_repository" { │
to answer questions you asked above - what do you mean "from where are you running the provider?" ES cluster is in AWS opensearch domain
okay - after playing around with it, it turned out the url in elastcisearch config was not set correctly:
provider "elasticsearch" { url = "https://MY_ES_DOMAIN.com" }
posting if someone else has similar issue
Using terraform version
v1.3.0
with phillbaker provider version2.0.4
, getting the following error while creating snapshot repository in AWS Opensearch version1.3
whereas the rest of the resource creation requests are working fineThe provider configurations that I am using are these
and the resource configurations are as follows
When I use custom python script using a particular user and IAM role, the snapshot repository is registered. However, using the same user and IAM role in terraform gives the above mentioned error.
With terraform provider debug logs enabled, getting this