-
Notifications
You must be signed in to change notification settings - Fork 6
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
Subnet cannot be assigned to network #158
Comments
The immediate reason for this error is a type mismatch.
If that doesn't help, could you please share the value of |
Hey 👋 I just tested the .Apply(int.Parse) approach and it worked. So I would suggest updating the documentation since this really confused me as a first time user or change the type of subnet.Network to string since this seems to be an internal Id used by Pulumi only. 😊 |
Thank you for confirming!
|
@mikhailshilkov When using Pulumi YAML this won't work as far as I can tell. I'm fairly new to Pulumi. |
Can this type mismatch fixed without any type conversion? This was confusing :) |
This same issue is causing problems when trying to use Typescript and type conversion is icky and somewhat defeats the point of the nice TypeScript typing. The example at https://www.pulumi.com/registry/packages/hcloud/api-docs/networksubnet/ is also invalid due to this issue. Would love this to be resolved. |
What happened?
I want to assign a subnet to an network, but I get an type error.
Steps to reproduce
Even the example from this documentation gives me the exact same type mismatch: https://www.pulumi.com/registry/packages/hcloud/api-docs/networksubnet/
Expected Behavior
I can assign the id of the network to the subnet so the subnet can correctly be created.
Actual Behavior
Type mismatch
Output of
pulumi about
niklasweimann@MacBook-Air-von-Niklas ~/dev/HCloudPulumi main ±✚ pulumi about
running 'dotnet build -nologo .'
Determining projects to restore...
All projects are up-to-date for restore.
/Users/niklasweimann/dev/HCloudPulumi/Program.cs(16,25): error CS0029: Cannot implicitly convert type 'Pulumi.Output' to 'Pulumi.Input' [/Users/niklasweimann/dev/HCloudPulumi/HCloudPulumi.csproj]
Build FAILED.
/Users/niklasweimann/dev/HCloudPulumi/Program.cs(16,25): error CS0029: Cannot implicitly convert type 'Pulumi.Output' to 'Pulumi.Input' [/Users/niklasweimann/dev/HCloudPulumi/HCloudPulumi.csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:01.42
Determining projects to restore...
All projects are up-to-date for restore.
/Users/niklasweimann/dev/HCloudPulumi/Program.cs(16,25): error CS0029: Cannot implicitly convert type 'Pulumi.Output' to 'Pulumi.Input' [/Users/niklasweimann/dev/HCloudPulumi/HCloudPulumi.csproj]
Build FAILED.
/Users/niklasweimann/dev/HCloudPulumi/Program.cs(16,25): error CS0029: Cannot implicitly convert type 'Pulumi.Output' to 'Pulumi.Input' [/Users/niklasweimann/dev/HCloudPulumi/HCloudPulumi.csproj]
Time Elapsed 00:00:01.42
Enter your passphrase to unlock config/secrets
(set PULUMI_CONFIG_PASSPHRASE or PULUMI_CONFIG_PASSPHRASE_FILE to remember):
CLI
Version 3.50.2
Go Version go1.19.4
Go Compiler gc
Host
OS darwin
Version 13.1
Arch arm64
This project is written in dotnet: executable='/opt/homebrew/bin/dotnet' version='7.0.100'
Current Stack: dev
TYPE URN
pulumi:pulumi:Stack urn:pulumi:dev::HCloudPulumi::pulumi:pulumi:Stack::HCloudPulumi-dev
pulumi:providers:hcloud urn:pulumi:dev::HCloudPulumi::pulumi:providers:hcloud::default_1_10_1
hcloud:index/network:Network urn:pulumi:dev::HCloudPulumi::hcloud:index/network:Network::Test
Found no pending operations associated with dev
Backend
Name MacBook-Air-von-Niklas.fritz.box
URL file://~
User niklasweimann
Organizations
Dependencies:
NAME VERSION
Pulumi 3.50.0
Pulumi.HCloud 1.10.1
Pulumi locates its logs in /var/folders/zb/p_drv5k56nd547h156279cj80000gn/T/ by default
warning: Failed to get information about the plugin: failed to discover plugin requirements: 'dotnet build -nologo .' exited with non-zero exit code: 1
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).
The text was updated successfully, but these errors were encountered: