Change the name_property to be the identity property by default, and to have desired_state: false by default #9581
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.
Setting
name_property: true
is now roughly equivalent toname_property: true, identity: true, desired_state: false
.If there is any other property which is marked as an identity though the name_property will no longer be considered an identity property. A subtle detail of this is that the name_property itself is not marked as being
identity: true
, it is implemented via thechef/mixin/properties.rb
mixin because the identity-ness of the name_property will be affected by other properties being marked as identity or not. That means you have to inspect the whole property collection -- hence implemented in the properties mixin. Consumers should check the identity_properties array on the resource class, and not inspect individual properties for being an identity themselves.It makes no sense to have the name_property be set to being desired_state either since the name should not change before or after the resource converges.
closes #4282