Pulumi / AzureKeyVault import / SkuName mismatch

212 views Asked by At

I am trying to import existing Azure KeyVault resource into Pulumi (C#, pulumi 2.11.2). I am heaving a problem with specifying right SkuName ("Standard" according to Azure Resource Explorer). If I set it to:

  • "Standard", I am getting: error: azure:keyvault/keyVault:KeyVault resource 'sandbox-pulumi-keyvault' has a problem: expected sku_name to be one of [standard premium], got Standard
  • "standard": = └─ azure:keyvault:KeyVault sandbox-pulumi-keyvault import [diff: ~skuName]; 1 warning and then of course: warning: inputs to import do not match the existing resource; importing this resource will fail

So I am kind of stuck here, running out of the options... Any suggestions?

Thanks, Mateusz

1

There are 1 answers

0
Mikhail Shilkov On

I tried reproducing the same error using the latest Azure provider (I have 3.23) but I got no difference while importing. standard worked fine in my case.

Anyway, you may want to override the diff that you see during a preview. You can set the ignoreChanges option:

const vault = new azure.keyvault.KeyVault("vault", {
    skuName: "standard",
    // ... other properties
}, {
    import: "/subscriptions/guid/resourceGroups/rg/providers/Microsoft.KeyVault/vaults/myvault",
    ignoreChanges: ["skuName"]
});