Skip to content

Feat #1562: Support dynamic type for values attribute enabling structured diff output - #1861

Open
dennismdejong wants to merge 1 commit into
hashicorp:mainfrom
dennismdejong:feat/1562-values-dynamic
Open

Feat #1562: Support dynamic type for values attribute enabling structured diff output#1861
dennismdejong wants to merge 1 commit into
hashicorp:mainfrom
dennismdejong:feat/1562-values-dynamic

Conversation

@dennismdejong

Copy link
Copy Markdown

The values attribute now uses types.Dynamic instead of types.List, allowing users to pass structured objects directly instead of only raw YAML strings in a list.

Changes

  • Changed Values field from types.List to types.Dynamic in both HelmReleaseModel and HelmTemplateModel
  • Updated schema from schema.ListAttribute to schema.DynamicAttribute
  • Updated getValues() and getValuesModel() to handle both:
    • types.Object (new): structured map/object values are converted to map[string]interface{} and merged
    • types.List (backward compatible): existing YAML string list format continues to work
  • Added dynamicObjectToMap() and attrValueToNative() helper functions for recursive conversion of Terraform types
  • Updated state upgrader to reference tftypes.DynamicPseudoType
  • Updated ImportState to use types.DynamicNull()

Backward Compatibility

Existing configurations using values = ["yaml: string"] continue to work unchanged. Users can now also use values = { key = "value" } for structured input.

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