Skip to content

refactor: deprecate plan field in cluster resource#190

Open
yellow-shine wants to merge 1 commit intomasterfrom
vk/c187-
Open

refactor: deprecate plan field in cluster resource#190
yellow-shine wants to merge 1 commit intomasterfrom
vk/c187-

Conversation

@yellow-shine
Copy link
Collaborator

@yellow-shine yellow-shine commented Feb 9, 2026

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)

Scenario Behavior
---------- ----------
Existing resources Modifying plan field produces no diff
New resources Initial plan value is fetched from API
terraform refresh State value is preserved, no drift
Using plan in HCL Shows deprecation warning

@yellow-shine yellow-shine changed the title deprecated plan field on cluster refactor: deprecate plan field in cluster resource Feb 9, 2026
- 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>
@yellow-shine yellow-shine force-pushed the vk/c187- branch 2 times, most recently from 32adc83 to 4db963e Compare February 9, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant