refactor: deprecate plan field in cluster resource#190
Open
yellow-shine wants to merge 1 commit intomasterfrom
Open
refactor: deprecate plan field in cluster resource#190yellow-shine wants to merge 1 commit intomasterfrom
yellow-shine wants to merge 1 commit intomasterfrom
Conversation
- Add IgnoreChangesString PlanModifier to suppress all diffs for deprecated fields - Add DeprecationMessage to plan field in schema - Modify Read() to preserve state value instead of overwriting from API This ensures existing resources won't trigger unexpected diffs when the plan field value changes, and users will see deprecation warnings. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
32adc83 to
4db963e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
The plan field has been promoted to the project resource level, making it redundant in the cluster resource. This PR deprecates the plan field in zillizcloud_cluster resource to prepare for its removal in a future major version.
Changes
Add DeprecationMessage: Users will see a warning when using the plan field
Add IgnoreChangesString PlanModifier: Suppresses all diffs for the deprecated field
Modify Read() to preserve state: Only sets plan from API when state is empty (e.g., import)