elastic / elastic/terraform-provider-elasticstack
[Feature] Ease integration with ECK-managed Elasticsearch clusters
- Dominant language
- Go
- Stars
- 209
- Forks
- 150
- Avg merge
- 22h 58m
- Merged PRs (30d)
- 172
Description
**Description**
Make it easier to use the Elastic Stack Terraform Provider for ECK-managed Elasticsearch clusters by avoiding having to retrieve and set all credentials and instead just request a kubeconfig file to connect to Kubernetes, along with the namespace and name of the Elasticsearch resource.
The Elastic provider will fetch the Secrets and Service created by ECK for the corresponding Elasticsearch cluster to set the username, password, endpoint and optional CA certificate to configure the Elasticsearch client. This implies that the provider must be able to communicate with the Kubernetes API which requires authentication, achieved either by passing a Kubeconfig file or by deploying the provider in the k8s cluster with a service account that has the necessary permissions (read Secrets and Services in the Elasticseach resource namespace).
**Proposals**
```terraform
provider "elasticstack" {
elasticsearch {
kube_config_path = "~/config/staging.kubeconfig"
#kube_in_cluster_config = true
namespace_name = "default/cluster-a"
}
}
```
```terraform
provider "elasticstack" {
kubernetes {
config_path = "~/config/staging.kubeconfig" # optional, in cluster config if not set
es_namespace_name = "default/cluster-a"
}
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.