https://pulumi.com logo
Title
o

orange-airplane-70350

10/30/2020, 3:32 AM
hey! I'm trying to integrate
azure-nextgen
to my existing program which already has
azure
provider. And I get the following error:
pulumi:providers:azure-nextgen (default_3_12_1):
    error: no resource plugin 'azure-nextgen-v3.12.1' found in the workspace or on your $PATH, install the plugin using `pulumi plugin install resource azure-nextgen v3.12.1`
I wonder if somebody faced it already and knows some workaround.
I use typescript and the following dependencies:
"@pulumi/azure": "^3.0.0",
"@pulumi/azure-nextgen": "^0.2.3",
it looks like
azure-nextgen
picks up version from
azure
package
it's
"version": "3.12.1"
in the package-lock.json
b

billowy-army-68599

10/30/2020, 3:51 AM
can you remove your
node_modules
and
package-lock.json
and try again?
o

orange-airplane-70350

10/30/2020, 5:37 AM
tried that. it changed the version in the error 😀:
error: no resource plugin 'azure-nextgen-v3.28.0'
t

tall-librarian-49374

10/30/2020, 7:11 AM
This is odd. I did use both providers side-by-side but did not get issues. Any chance you could try to repro this in a new project that you could then share?
o

orange-airplane-70350

10/30/2020, 3:13 PM
reproduced:
import * as azure from "@pulumi/azure";
import * as storage from "@pulumi/azure-nextgen/storage/latest";

const group = new azure.core.ResourceGroup(
    "mygroup",
    {
        name: "rg",
        location: "SoutheastAsia"
    });

const sharedArgs = {
    resourceGroupName: group.name,
    location: group.location,
};
const sharedOptions = { parent: group }; // Shared opts breaks things

const storageAccount1 = new azure.storage.Account(
    "mystorage1",
    {
        ...sharedArgs,
        accountReplicationType: "LRS",
        accountTier: "Standard",
    },
    sharedOptions);

const storageAccount2 = new storage.StorageAccount(
    "mystorage2",
    {
        ...sharedArgs,
        accountName: "myuniquename2",
        sku: { name: "Standard_LRS" },
        kind: "StorageV2",
    },
    sharedOptions); // Replace `sharedOptions` with `{ parent: group }` and it works
t

tall-librarian-49374

10/30/2020, 3:15 PM
Interesting! So, this is triggered by parenting to a resource from another provider. Could you open an issue for that?
o

orange-airplane-70350

10/30/2020, 3:16 PM
sure! will do tomorrow