New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Computed values within nested lists within nested sets are unset by the framework #479
Comments
Hi @liamcervante 👋 Thanks for raising this. I wonder if this may be resolved with #468 and v0.12.0, which was released yesterday. Under the hood, sets are a slice of elements similar to lists, but previously the framework would use path-based lookups and data setting as it traversed deeper into collection types. Trying to doing this with sets, which treat the whole value of the set element as part of the path, was problematic as underlying values would change from null to unknown, etc. The new release aligns plan modification with the underlying slice elements, so that class of issue should no longer be present. I'm going to try rebasing the corner PR, since that repository just had its dependency upgraded, to see if maybe we resolved this. 👍 |
Hey again 👋 I was able to confirm in hashicorp/terraform-provider-corner#89 that the resource using terraform-plugin-framework@v0.12.0 was able to successfully plan immediately without difference after apply: $ TF_ACC=1 go test -count=1 -run='TestAccResourceNested' -v ./internal/tf6muxprovider/provider1
=== RUN TestAccResourceNested
--- PASS: TestAccResourceNested (1.12s)
PASS
ok github.com/hashicorp/terraform-provider-corner/internal/tf6muxprovider/provider1 2.195s There may be other unknown issues with this sort of schema setup, so if you want to play with it more, I'll leave this issue open for you. Otherwise, if we don't hear anything back in a few days we will close this out and we can track any new details in a fresh issue. 😄 |
Hi Brian! Thanks so much for this, yes I agree that this issue is fixed. However, I think I've found another one. This can be reproduced with my latest commit to the same branch I used previously: liamcervante/terraform-provider-corner@f6f2037 Basically, emply blocks within nested lists are breaking now as the framework is setting the value for these nested blocks as null instead of an empty list. I think the issue is here, as the ModifyAttributePlanRequest isn't setting the I can leave this issue open tracking this, or file a new one. Which would you prefer? I could even have a go at fixing this myself as it seems relatively straightforward, but that might not be the process. Let me know! |
Potential fix for the latest issue: #480 |
I have found another issue, but I think it's different enough that I will close this and create a new one. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Module version
Relevant provider source code
PR reproducing the bug
Terraform Configuration Files
Debug Output
N/A, the error is reproduced in a test case in the PR
Expected Behavior
The test case in the PR should pass.
Actual Behavior
Steps to Reproduce
TF_ACC=1 go test internal/tf6muxprovider/provider1/*.go
References
The text was updated successfully, but these errors were encountered: