handle optionals during drift detection and updates for namespace #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since pulsar have some defaults, it's quite beneficial to allow
undefined values in the tf definition.
That basically means "not managed by tf". But in the previous state
of this provider null-values were submitted in any case,
sometimes silently having breaking a valid setup or just facing a validation on
the pulsar side and failing an update.
This PR brings per-prop check, to avoid unnecessary api calls and be more precise on what is really updating.
That way if any of the optionals left empty, it wouldn't be changed on the pulsar side.
To mitigate some tf limitations, where tf doesn't know if props of an element of the set defined,
this PR brings some validation and assuming defaults which are invalid,
to simply ignore it later on update/create.
This leads to side effect of never empty plan after update when only part of the
namespace_config
specified.That should encourage user to define all the properties. Another option would be to flatten this config and
use tf capabilities to check if its defined, but that would require migration of the state and config.
fixes #11