https://pulumi.com logo
Title
f

few-toddler-19603

06/28/2022, 11:00 PM
How do I find the resource ID for a vlan I created via terraform?
l

little-cartoon-10569

06/28/2022, 11:01 PM
For importing? The description of import IDs are at the bottom of the Pulumi doc page.
The page for that specific resource type.
f

few-toddler-19603

06/28/2022, 11:01 PM
Ok, I'll take a look there
Oh do I have to import it via the CLI before I can use it in pulumi?
l

little-cartoon-10569

06/28/2022, 11:03 PM
No. The CLI import is handy, but you can do it via the
import
opt, directly in your code. If you do that, you have to remember to remove the
import
opt after the import is complete.
f

few-toddler-19603

06/28/2022, 11:04 PM
Ok well for testing I tried it via the CLI, but neither 1000 (the vlan ID) nor
vlan0
worked to identify it
and I don't know of any other way to identify it
l

little-cartoon-10569

06/28/2022, 11:06 PM
Just above "Package Details", it says the VLAN UUID. https://www.pulumi.com/registry/packages/equinix-metal/api-docs/vlan/#import
f

few-toddler-19603

06/28/2022, 11:06 PM
Ok... i don't see how I'm supposed to find a UUID
but I'll take a look, maybe their cli tool can give it up
can I have pulumi list all things it can "see" via the commandline?
l

little-cartoon-10569

06/28/2022, 11:07 PM
I've never used Equinix, sorry. Their console would probably be required? Maybe hovering over the link to it?
f

few-toddler-19603

06/28/2022, 11:07 PM
like list all vlans
l

little-cartoon-10569

06/28/2022, 11:07 PM
No, Pulumi cannot see things in the provider that aren't already in state.
f

few-toddler-19603

06/28/2022, 11:08 PM
I already considered hovering over it, but there isn't any actual link except to delete it, but maybe inspect element will reveal some secrets?
If not I can contact my tech support contact there
l

little-cartoon-10569

06/28/2022, 11:09 PM
That might be best.
f

few-toddler-19603

06/28/2022, 11:17 PM
Managed to find it in the network logs in browser devtools, under a query to the packet.net api with virtual-networks, it's the first ID field, in case anyone else (or I) need to find that again
🎉 1
r

rapid-raincoat-36492

06/29/2022, 11:31 AM
In general, when I've had tricky resources like this, I just look in the terraform statefile, find the resource in question, and use the ID there as the import ID in Pulumi. For any provider that is non-native to Pulumi, the IDs will be the same between Terraform/Pulumi