Description
Describe the bug
elasticstack_elasticsearch_snapshot_repository does not support "endpoint" attribute for S3 repo, so that it can be set to custom S3 endpoint.
https://registry.terraform.io/providers/elastic/elasticstack/latest/docs/resources/elasticsearch_snapshot_repository#s3-2
To Reproduce
Steps to reproduce the behavior:
Set custom endpoint for S3 as below,
resource "elasticstack_elasticsearch_snapshot_repository" "s3_repo" {
name = "s3-elasticsearch-backup"
s3 {
client = "default"
endpoint = "s3.eu-west-2.amazonaws.com"
bucket = "elasticsearch-s3"
}
}
And run terraform apply. S3 endpoint defaults to "s3.amazonaws.com", which is blocked for us but only "s3.eu-west-2.amazonaws.com" is allowed.
Expected behavior
S3 snapshot repo created in elasticsearch
Debug output
│ Error: Unsupported argument
│
│ on s3-snapshots.tf line 6, in resource "elasticstack_elasticsearch_snapshot_repository" "s3_repo":
│ 6: endpoint = "s3.eu-west-2.amazonaws.com"
│
│ An argument named "endpoint" is not expected here.
Screenshots
If applicable, add screenshots to help explain your problem.
Versions (please complete the following information):
- OS: Linux
- Terraform Version 1.9.8
- Provider version 0.11.14
- Elasticsearch Version 8.17.4
Additional context
We have resolved to creating the repo using direct API call through bash script, but it will be nice to manage it as part of terraform resource.