Skip to content

Add enable_resources toggle to prevent drift on computed resources - #1863

Open
dennismdejong wants to merge 1 commit into
hashicorp:mainfrom
dennismdejong:fix/1791-resources-drift
Open

Add enable_resources toggle to prevent drift on computed resources#1863
dennismdejong wants to merge 1 commit into
hashicorp:mainfrom
dennismdejong:fix/1791-resources-drift

Conversation

@dennismdejong

Copy link
Copy Markdown

Description

Adds an enable_resources attribute (bool, default true) to helm_release that allows users to disable tracking of Kubernetes live resources in the computed resources attribute.

When set to false, the provider will not fetch dry-run or live resources, eliminating drift caused by external tools modifying resources after deployment.

Background

The resources computed attribute (introduced in PR #1693, v3.1.0) shows Kubernetes live state. When controllers modify resources after deployment (e.g. updating image tags in CI), the provider detects drift because the dry-run resources (from chart templates) differ from the live resources.

Implementation

  • Added enable_resources field to HelmReleaseModel (default true)
  • Added schema attribute as Optional/Computed bool
  • In ModifyPlan, conditionally call getDryRunResources based on enable_resources
  • In setReleaseAttributes, conditionally call getLiveResources based on enable_resources

Testing

  • Existing tests pass without changes (default behavior unchanged)
  • Code compiles cleanly

Fixes #1791

Adds an  attribute (bool, default true) to helm_release
that allows users to disable tracking of Kubernetes live resources in the
computed  attribute. When set to false, the provider will not
fetch dry-run or live resources, eliminating drift caused by external
tools modifying resources after deployment.

Fixes hashicorp#1791
@dennismdejong
dennismdejong requested review from a team, iam404 and rigalGit as code owners July 28, 2026 05:11
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.

New resources attribute in 3.1.0 causes drift on deployment image specs

1 participant