Skip to content

Feat #1095: Add drift_detection attribute to detect in-cluster changes via three-way comparison - #1854

Open
dennismdejong wants to merge 1 commit into
hashicorp:mainfrom
dennismdejong:feat/1095-three-way-merge
Open

Feat #1095: Add drift_detection attribute to detect in-cluster changes via three-way comparison#1854
dennismdejong wants to merge 1 commit into
hashicorp:mainfrom
dennismdejong:feat/1095-three-way-merge

Conversation

@dennismdejong

Copy link
Copy Markdown

Adds a drift_detection boolean attribute (default: false) to helm_release. When enabled, the Read function compares the Helm release manifest against live Kubernetes resource manifests and reports any differences as a warning diagnostic during planning.

Key changes:

  • helm/resource_helm_release.go: Added DriftDetection field, schema attribute, drift detection call in Read, and detectDrift function
  • helm/kube_resources.go: Added getManifestResources helper to extract resources from the release manifest

The comparison normalizes both manifest and live resources (strips server-side annotations, managed fields, volatile metadata) before comparing for true functional drift.

@dennismdejong
dennismdejong requested review from a team, iam404 and rigalGit as code owners July 27, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant