digitalocean provider: type mismatches for 'dropletId' #4173
Labels
kind/bug
Some behavior is incorrect or out of spec
resolution/duplicate
This issue is a duplicate of another issue
Short version:
Inside digitalocean component, field 'dropletId' is defined in some parts as number, in other parts as string !? But the the Droplet resource has it as Pulumi.ID (string). At least where defined as 'number' I can't use those resources.
Please let me know if there's a quick fix I could do until this gets sorted out.
Hardcoding it should be out of the question - I want to have both a production and staging environment based on the same codebase.
Details:
Maybe I'm missing something - I'm a new user, but I wanted to 'import' what I have in DigitalOcean, into Pulumi.
Among others things I have a Droplet and associated FloatingIp.
The problem is that with the code that I have (typescript), obtained based on a terraformer -> tf2pulumi flow, when I do a 'pulumi up', it will show that the floating IP will get the property 'dropletId' removed from my FloatingIp resource. Bad.
My code is initially like:
Based on the diff shown to me, I said I should add property 'dropletId' to the FloatingIp construction args, like 'dropletId: var1.id'
But...I can't.
The problem is that Droplet ID is defined as Pulumi.ID (which itself is a string), but 'dropletId' is declared as 'number', inside the FloatingIP resource.
Unless that is normal and there is some kind of type transformation between an Output<Pulumi.ID> and Input I should know about, I can't use it :-(
I see that the 'dropletId' is being defined as number in several places inside Pulumi, and I'm wondering if it isn't like this because that's how it is defined in the original terraform plugin: https://github.com/terraform-providers/terraform-provider-digitalocean/blob/master/digitalocean/datasource_digitalocean_floating_ip.go
I found out that at least in another place, it is defined as string: DropletSnapshot
It should probably be Pulumi.ID or "Pulumi.ID | string".
Regards.
The text was updated successfully, but these errors were encountered: