terraform-provider-ec icon indicating copy to clipboard operation
terraform-provider-ec copied to clipboard

Automatically add and remove dedicated masters.

Open gigerdo opened this issue 10 months ago • 1 comments

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

gigerdo avatar Apr 24 '24 14:04 gigerdo

@tobio thank you for the feedback. I implemented your feedback in the last two commits.

gigerdo avatar May 02 '24 15:05 gigerdo

@dimuon thank you very much for taking the time to review this 🥇

gigerdo avatar May 17 '24 14:05 gigerdo

Hello @gigerdo , any timeline to when this will be released ?

hnajib-sym avatar Aug 12 '24 07:08 hnajib-sym

@hnajib-sym we do have plans to release a version 0.11 soon, though we don't have an exact timeline.

gigerdo avatar Aug 12 '24 08:08 gigerdo

We also have run into this same issue and would love to see a release soon!

nathan-maves avatar Aug 23 '24 00:08 nathan-maves

We have now release 0.11.0 which contains this feature: https://github.com/elastic/terraform-provider-ec/releases/tag/v0.11.0

gigerdo avatar Aug 29 '24 07:08 gigerdo