Skip to content
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

[Feature] Don't remove the Elasticsearch authentication on resource-level elasticsearch_connection #546

Open
Zawadidone opened this issue Jan 29, 2024 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@Zawadidone
Copy link

Is your feature request related to a problem? Please describe.
The Elasticsearch authentication on resource-level elasticsearch_connection will be deprecated, which forces the usage of a provider that uses hardcoded credentials or a provider that depends the resource ec_deployment.

Using a hardcoded provider goes against the principle of using a single Elastic Cloud Terraform provider to configure multiple deployments that have Elasticsearch resources. Defining the the Elasticsearch authentication on resource level suits usage of the Elastic Cloud Terraform provider.

If a Terraform module that contains an Elastic Cloud deployment with Elasticsearch resources is destroyed, the Elasticsearch resources can't be deleted because the Elastic Stack Terraform provider is also destroyed in the same run (#509 (comment)).

Notice that the Elastic Stack provider is not configured, since we'll be using an elasticsearch_connection block
for each of our resources, to point to the Elastic Cloud deployment. This is because terraform can not configure providers that are dependent on one another. - https://github.com/elastic/terraform-provider-elasticstack/pull/16/files#diff-b9b7a6e1524a6af9ff3c316d95a6dd1fa5b95d95e130de3ed83228f34e8b4929R40-R41

This issue is related to #509, because authentication on resource-level has not been implemented for Kibana.

Describe the resource you would like to have implemented.
Don't remove Elasticsearch authentication on resource-level elasticsearch_connection and don't force the Elasticsearch connection via the provider configuration.

@Zawadidone Zawadidone added the enhancement New feature or request label Jan 29, 2024
@Zawadidone Zawadidone changed the title [Feature] Don't remove Elasticsearch authentication on resource-level elasticsearch_connection [Feature] Don't remove the Elasticsearch authentication on resource-level elasticsearch_connection Jan 29, 2024
@BrianRichardson
Copy link

I completely agree with this.
It seems a step backwards to move connection details to the provider configuration without providing a practical alternative technique for providing these details dynamically.
We have Elastic Cloud deployments in multiple regions and am currently using resource specific connections.
Without this, we would be forced to clone and then hard-code these connection details.

@cah6
Copy link

cah6 commented Mar 14, 2024

+1, I want to chime in my agreement here.

We have a use case where we will have many smaller deployments that we would like to efficiently manage with terraform, which for us manifests up as a foreach loop to create similar deployments (with the same users, roles, etc on each) based off some input config list. Because of hashicorp/terraform#19932, it is not possible to create a provider per iteration of this foreach loop, which means that we need to utilize this resource-level elasticsearch_connection feature.

Removal of this would make our elasticstack terraform the only piece of our infrastructure that has to be explicitly listed out one-by-one.

@Kushmaro Kushmaro added this to the 0.12.0 milestone Sep 11, 2024
@Kushmaro Kushmaro modified the milestones: 0.12.0, 0.13.0 Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants