Skip to content
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

Error generating code for nested block with nesting mode 'single' in Upjet v1.4.1 #446

Open
joekky opened this issue Oct 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@joekky
Copy link

joekky commented Oct 30, 2024

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?
@joekky joekky added the bug Something isn't working label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant