Open eBeyond opened 3 months ago
Hi @eBeyond. Thanks for opening an issue. I'm sorry that you are seeing a panic here. We will take a look as soon as possible.
Hey @eBeyond, thanks for reporting. I'm failing to reproduce the issue. The resource provisions fine for me.
Looking at the stack trace, it seems to suggest this is a problem with an Invoke, rather than the resource - are you using any functions somewhere in the program? Could you please post a program which exhibits the panic?
I've found the issue. It wasn't related to this module. Someone created a pyproject.toml and a poetry.lock. That seems to be the reason. After changing the pulumi.yaml to utilize poetry it starts working. Sorry
Glad you found a solution @eBeyond. The panic you got is not the desired experience we'd like users to see, so if you have any more details about how you got pulumi to panic that'd be helpful in making sure other users don't hit the same issue.
Thanks!
The last comment was wrong. It causes to reuse pretty old pulumi-hcloud. It was 1.17.1. If I immediatly updated to 1.20.0 I got the error again. After that I've tried to update release by release until 1.19.1. That was the last one working properly. If I do a pulumi refresh and pulumi up at this point I could update to 1.20.0. I think that it might be an issue with the state which could be outdated or not compatible with 1.20.0. But I'm not sure. After doing the refresh and up it was working as expected.
When running 1.20.0 it sometimes work, sometimes not. I'm trying to setup a script to reproduce it.
Okay, thanks. LMK if you find anything for us to dig into.
I've found the real issue with this issue now: The issue wasn't related to pyproject.toml or the Network in hcloud. The issue which has lead to the panic was in the get_image() function. If you've got two or more snapshots with a label "type=fw" and you try to get the latest with this call:
fw_img = hcloud.get_image(
with_selector="type=fw",
most_recent=True,
)
it fail with the message: panics: can't convert "x86" to cty.Value
If you're defining the architecture like this:
fw_img = hcloud.get_image(
with_selector="type=fw",
most_recent=True,
with_architecture="x86"
)
It works as expected. I think this has to do with the lookup of the snapshots within the get_image() function.
Thanks for getting back to us @eBeyond. Does the same thing happen if you specify the id
of the image instead of the properties?
For maintainers: this might be related to https://github.com/pulumi/pulumi-terraform-bridge/issues/2282
Does not work, error as described:
fw_img = hcloud.get_image(
id="<existing_id>",
)
Works as expected:
fw_img = hcloud.get_image(
id="<existing_id>",
with_architecture="x86"
)
Hi @eBeyond - thank you for your help in root causing this.
It's looking like you have a workaround for now by specifying the architecture explicitly. It's looking like this will be resolved by https://github.com/pulumi/pulumi-terraform-bridge/issues/2282. We'll update here as soon as we have a fix.
Describe what happened
I've got a Network configuration like this:
This was working some time ago. But now (after an update) it failed:
Sample program
Log output
Affected Resource(s)
I can only see it failing on network until now.
Output of
pulumi about
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).