terraform-provider-ec
terraform-provider-ec copied to clipboard
Automatically add and remove dedicated masters.
Description
If the terraform config defines no master, the provider will add/remove it as needed:
- Added if the number of nodes is >= the dedicated master threshold
- Removed if the number of nodes is < the dedicated master threshold
- The master tier can still be explicitly set (For example to change the size of the dedicated master tier)
Regarding the implementation:
- Uses a
ModifyPlan
modifier to first calculate the number of nodes, then adds or removes the master tier- The main advantage of this is that the plan before applying already shows that a master is added/removed
- It is necessary to load the template to have some info about default sizes etc.
Related Issues
https://github.com/elastic/terraform-provider-ec/issues/635 (Most of the problems described in that issue have already been solved, this PR just adds automatically adding/removing master tier)
Motivation and Context
How Has This Been Tested?
Types of Changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Refactoring (improves code quality but has no user-facing effect)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation
Readiness Checklist
- [x] My code follows the code style of this project
- [ ] My change requires a change to the documentation
- [ ] I have updated the documentation accordingly
- [x] I have added tests to cover my changes
- [x] All new and existing tests passed
@tobio thank you for the feedback. I implemented your feedback in the last two commits.
@dimuon thank you very much for taking the time to review this 🥇
Hello @gigerdo , any timeline to when this will be released ?
@hnajib-sym we do have plans to release a version 0.11 soon, though we don't have an exact timeline.
We also have run into this same issue and would love to see a release soon!
We have now release 0.11.0 which contains this feature: https://github.com/elastic/terraform-provider-ec/releases/tag/v0.11.0