Error generating code for nested block with nesting mode 'single' in Upjet v1.4.1
- Dominant language
- Go
- Stars
- 481
- Forks
- 131
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 11
Description
I'm encountering an error when running make generate using Upjet v1.4.1 for a Terraform provider that includes a nested block with nesting_mode: "single":
# Steps to Reproduce:
Use Upjet v1.4.1 with a Terraform provider that includes a resource containing a nested block with nesting_mode: "single".
Run make generate to generate the provider code.
The code generation fails with the above error.
Expected Behavior:
Upjet should handle nested blocks with nesting_mode: "single" or provide guidance on how to configure such cases.
Actual Behavior:
Upjet fails with the error, preventing code generation.
Environment Details:
Upjet version: v1.4.1
Terraform version: 1.5.7
Go version: 1.21
Operating System: macOS on ARM64 (darwin_arm64)
Additional Context:
The issue seems to be related to Upjet's handling of nested blocks with nesting_mode: "single" in the newer version.
This problem did not occur with Upjet v0.9; code generation succeeded without errors.
I own the Terraform provider repository, and the next_id field is defined as shown in the schema snippet above.
Question:
Is this a known issue or limitation in Upjet v1.4.1?
Has there been a change in how Upjet handles nesting_mode: "single" between versions v0.9 and v1.4.1?
Could you provide guidance on how to configure Upjet to process such nested blocks correctly?
Is there a recommended workaround or fix for this issue?
Contributor guide
Assessment
This issue has not been assessed yet.