terraform test: support nested collection mock values - #38947
Closed
maithilijoshi20 wants to merge 1 commit into
Closed
terraform test: support nested collection mock values#38947maithilijoshi20 wants to merge 1 commit into
maithilijoshi20 wants to merge 1 commit into
Conversation
maithilijoshi20
force-pushed
the
fix-nested-type-collection-mocks
branch
from
July 30, 2026 05:28
b88c4d6 to
d859f62
Compare
maithilijoshi20
force-pushed
the
fix-nested-type-collection-mocks
branch
from
July 30, 2026 05:32
d859f62 to
903ab60
Compare
Contributor
|
Thanks for your submission. Please see Contributing.md, particularly the sections on Proposing a Change and AI Usage. Thank you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
override_data values for Plugin Framework nested_type list and set attributes are represented as HCL tuples. Terraform rejected them before coercing them to the provider schema, so terraform test could not use these overrides.
Change
Nested single and group attributes still require object values. Nested list, set, and map attributes now use the existing collection conversion path with the nested schema ConfigType, which converts supported collection values and fills nested objects.
Tests
Focused regression coverage exercises a data-source override containing an HCL tuple for a nested list attribute, as well as list, set, and map conversion cases.
Not run: the full Terraform test suite.
Notes
Object inputs for nested collection attributes retain the existing empty-collection element-template behavior.
Fixes #38369.
Changelog
Included a 1.17 bug-fix entry.