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

allow ec_deployment_elasticsearch_keystore resource to trigger reload #836

Open
blueo opened this issue Aug 7, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@blueo
Copy link

blueo commented Aug 7, 2024

Overview

I can see previous issues with using the ec_deployment_elasticsearch_keystore resource that require restarting the deployment eg #780, #433 and that there was a solution provided to allow passing keystore values during deployment creation.

This is OK but gets a bit awkward when attempting to separate functions into TF modules. For example if I have a module that creates a deployment (call it elastic_deployment) to add a snapshot repository to this deployment you need access to a elasticstack provider - but modules can't define providers so this needs to happen in the next level up (call it the main module) - so a repository feature needs to go in a second module so that it can have a provider passed to it (especially if creating multiple deployments and using provider aliases) - however now, the elastic_deployment module needs knowledge of things created for the snapshot namely the s3 bucket access credentials as they need to be passed at creation. So I end up with three modules as the s3 bucket creation + access credentials needs to happen before the deployment is created.

Ideally this could be avoided by allowing the ec_deployment_elasticsearch_keystore to trigger a reload for reloadable values - in this case I could keep all the snapshot logic in the one module. I'm not really sure what the use case is for the ec_deployment_elasticsearch_keystore without this functionality since you can't use anything it creates until a deployment is restarted.

At the least it would be good to mention this limitation on the resource docs to avoid this refactor when you discover that the keystore actually requires a deployment restart

Possible Implementation

Testing

Context

Your Environment

@blueo blueo added the enhancement New feature or request label Aug 7, 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

1 participant