Skip to content

Comments

Fill computed values of Nested type#38200

Draft
dsa0x wants to merge 7 commits intomainfrom
sams/fill-nested
Draft

Fill computed values of Nested type#38200
dsa0x wants to merge 7 commits intomainfrom
sams/fill-nested

Conversation

@dsa0x
Copy link
Member

@dsa0x dsa0x commented Feb 23, 2026

Fixes #37939

This PR enables the mocking framework to fill in mocked values of collection types (set, list, map). The issue particularly affected providers that implement these collection types as a NestedBlock-style object, a behaviour which terraform knows how to deal with. The ConfigType() method on the schema object has already helped us in converting the different block types into valid cty Types, e.g NestingList => cty.List. The returned type can then be used with fillType, which essentially traces all paths, and ensures that the mocked value adheres to the schema, or generates a value for the path.

1.15.x

Rollback Plan

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

CHANGELOG entry

  • This change is user-facing and I added a changelog entry.
  • This change is not user-facing.

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.

Unable to mock data source attribute of list type using override_data, suspected due to missing type conversion

1 participant