I'm trying to use `pulumi import` to import an exi...
# general
s
I'm trying to use
pulumi import
to import an existing Azure resource group. I'm trying to specify the resource group as the
--parent
but am getting
error: an inline resource must be specified if no import file is used.
Is there an example of importing an Azure resource that I can compare against?
I'm not clear on what the "type" should be for an Azure resource group.
Also not sure if I can just use the resource group name or something more fully qualified
r
what are you trying?
what resource are you trying to import?
oh right the resource group, sorry. I’m not sure what you mean by
I’m trying to specify the resource group as the 
--parent
Are you using the azure-native provider?
Can you tell me what you tried that resulted in that error?
https://www.pulumi.com/docs/reference/pkg/azure-native/resources/resourcegroup/#import The format is:
Copy code
pulumi import [type] [name] [id]
So:
Copy code
pulumi import azure-native:resources:ResourceGroup myResourceGroup /subscriptions/{subscription-id}/resourceGroups/myResourceGroup
s
Ah ok let me try it with that type...
I tried this:
pulumi import azure-native:resources:ResourceGroup "/subscriptions/{subscription guid}/resourceGroups/{resource group name}"
but no go
oh wait, I am missing the
id
argument
r
you’re missing the name arg, you have
pulumi import [type] [id]
name
is what you would like to call the resource in your pulumi program
s
ah ok..
It's importing! yay
🎉 1
Thank you very much
1
partypus 8bit 1