fix: allow array output type in tfstate outputs#1373
Merged
georgidimdimitrov merged 10 commits intocloudfoundry:mainfrom Jan 28, 2026
Merged
fix: allow array output type in tfstate outputs#1373georgidimdimitrov merged 10 commits intocloudfoundry:mainfrom
georgidimdimitrov merged 10 commits intocloudfoundry:mainfrom
Conversation
Contributor
Author
|
Hi maintainers |
Member
georgidimdimitrov
left a comment
There was a problem hiding this comment.
Generally looks ok with minor suggestions.
Member
|
Suggestions are addressed now. |
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.
Checklist:
##Summary
Fix handling of Terraform state output types that are represented as arrays (e.g. ["list","string"]) instead of a single string.
##Background
Terraform/OpenTofu may serialize tfstate.outputs[*].type as a JSON array for composite types.
The existing implementation assumed this field was always a string, which caused state parsing to fail when array-based types were encountered.
This issue was reported in #1279 .
##Changes
Allow tfstate.outputs[*].type to be stored and processed as raw JSON
Update the brokerpak test framework to correctly emit array output types
Add a unit test covering array output type handling
##Impact
Backward compatible
No behavior change for existing string-typed outputs
Fixes failures when working with Terraform states containing list/object output types
##Testing
Added unit test: TestNewTfstate_AllowsArrayOutputType
Existing test suite passes for affected packages
Fixes #1279