did any one able to import azure storage blob using pulumi. if so please let me know the command?

176 Views Asked by At

I am trying to import the azure storage blob state in to pulumi using PULUMI CLI.

tried below cmd

pulumi import --yes azure-native:storage:Blob testblob

it thrown error with below.

error: Preview failed: "resourceGroupName" not found in resource state

please let me know if any one is able to successfully import the azure storage blob resource in to pulumi.

thanks, kumar

tried below cmd

pulumi import --yes azure-native:storage:Blob testblob

it thrown error with below.

error: Preview failed: "resourceGroupName" not found in resource state

expected result: to import successfully actual result: import failed.

1

There are 1 best solutions below

0
On

If you look at the docs for a Blob resource there's an import section (this section exists on all resources).

The actual command you'll need is:

pulumi import azure-native:storage:Blob myresource1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}/blobServices/default/containers/{containerName}/blobs/{blobName}