Hi, trying to get started using Pulumi. I have my ...
# azure
r
Hi, trying to get started using Pulumi. I have my dev resource group populated with the resources I need. I'm trying to run the import cli tool to generate example for me, My command looks like this:
pulumi import azure-native:resources:resourceGroup [RESOURCE_GROUP_NAME] /subscription/[SUBSCRIPTION_ID]
However I'm getting the following error:
error: Preview failed: autorest/azure: Service returned an error. Status=400 Code="MissingApiVersionParameter" Message="The api-version query parameter (?api-version=) is required for all requests."
Any pointers where I am going wrong would be most appreciated
l
Have you seen this in the API docs for Azure Native: https://www.pulumi.com/registry/packages/azure-native/api-docs/resources/resourcegroup/#import The example command line has more after /subscription/[subscription-id]:
Copy code
pulumi import azure-native:resources:ResourceGroup myResourceGroup /subscriptions/{subscription-id}/resourceGroups/myResourceGroup
r
Thanks, that did the trick. I tried that initially, but have azure-nativeresourceresourceGroups maybe the ResourceGroup was the issue in the type name
l
FWIW, I keep an "import" stack in my project so I can do imports into a stack other than the one where I actually want Pulumi to manage the resources.