Skip to content

Feat #1745: Support semver version ranges in helm_release version attribute - #1853

Open
dennismdejong wants to merge 1 commit into
hashicorp:mainfrom
dennismdejong:feat/1745-version-ranges
Open

Feat #1745: Support semver version ranges in helm_release version attribute#1853
dennismdejong wants to merge 1 commit into
hashicorp:mainfrom
dennismdejong:feat/1745-version-ranges

Conversation

@dennismdejong

Copy link
Copy Markdown

Description

This PR implements support for semver version ranges in the version attribute of helm_release resource and helm_template data source.

Changes

  1. Updated schema descriptions - Updated the version attribute description in both the resource and data source to document that semver range syntax is supported (e.g., ^1.2.3, >= 1.0.0 < 2.0.0).

  2. Standard chart repositories - Version ranges already work natively with Helm's ChartPathOptions.Version for non-OCI charts. No changes needed here beyond documentation.

  3. OCI chart version resolution - Added resolveOCIVersionConstraint() function that resolves semver constraints for OCI charts by:

    • Checking if the version string is already an exact semver version (pass through)
    • Parsing the version as a semver constraint
    • Listing available tags from the OCI registry via registry.Client.Tags()
    • Finding the best matching version that satisfies the constraint
    • Setting the resolved exact version on ChartPathOptions.Version

The OCI resolution is applied in both chartPathOptions (resource) and chartPathOptionsModel (data source) when the repository is an OCI registry and the version is a non-empty constraint string.

Fixes #1745

@dennismdejong
dennismdejong requested review from a team, iam404 and rigalGit as code owners July 27, 2026 19:57
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.

Accept version ranges in helm_release

1 participant