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

Cannot iterate over a value of type number (during import of terraform HCL) #15968

Open
krisgholson opened this issue Apr 17, 2024 · 1 comment
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@krisgholson
Copy link

krisgholson commented Apr 17, 2024

What happened?

In an existing directory containing .tf files (and no current pulumi stack), ran the following command pulumi convert --from terraform --language typescript and then received the following error:

================================================================================
The Pulumi CLI encountered a code generation error. This is a bug!
We would appreciate a report: https://github.com/pulumi/pulumi/issues/
Please provide all of the below text in your report.
================================================================================
Pulumi Version:   v3.113.0
error: main.pp:371,1-400,2: /tmp/pulumi-convert3051651746/vpc_4.0.0/main.pp:96,5-115: cannot iterate over a value of type number; , and 38 other diagnostic(s); /tmp/pulumi-convert3051651746/vpc_4.0.0/main.pp:96,5-115: cannot iterate over a value of type number; , and 38 other diagnostic(s)
error: could not generate output program

Example

Happy to provide my *.tf files if needed to a developer working this bug) but not ready to share them here.

Output of pulumi about

CLI          
Version      3.113.0
Go Version   go1.22.2
Go Compiler  gc

Host     
OS       ubuntu
Version  23.10
Arch     x86_64

Backend        
Name           pulumi.com
URL            https://app.pulumi.com/krisgholson
User           krisgholson
Organizations  krisgholson, upcycleholdings
Token type     personal

Pulumi locates its logs in /tmp by default
warning: Failed to read project: no Pulumi.yaml project file found (searching upwards from /home/kris/code/upcycle-holdings/swaggy-infrastructure). If you have not created a project yet, use `pulumi new` to do so: no project file found
warning: Failed to get information about the current stack: no Pulumi.yaml project file found (searching upwards from /home/kris/code/upcycle-holdings/swaggy-infrastructure). If you have not created a project yet, use `pulumi new` to do so: no project file found

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@krisgholson krisgholson added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Apr 17, 2024
@justinvp justinvp removed the needs-triage Needs attention from the triage team label Apr 19, 2024
@justinvp
Copy link
Member

Thanks for opening the issue, @krisgholson, and sorry for the trouble!

Happy to provide my *.tf files if needed to a developer working this bug) but not ready to share them here.

Thanks! Could you email them to me at justin@pulumi.com? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants