Hello guys, can i create multiple azure blobContai...
# general
b
Hello guys, can i create multiple azure blobContainers inside loop for (const container of containers){ new azure_native.storage.BlobContainer('blobContainer', { accountName: storageAccount.name, containerName: name, resourceGroupName: resourceGroup.name } } Erro: Duplicate recource URN I tryed with await but still same error
b
yea you can but the name of the resource needs to be unique. That is how pulumi tracks the state of the resource. So you could do a for loop and you could append the index to each name so that they are numbered and thus unique - but you need to be careful and make sure you are doing it in such a way that if the cloud resource already exists it gets the same name the next time you call
pulumi up
otherwise pulumi will see it as a new resource and destroy/create
👍 1