This message was deleted.
s
This message was deleted.
i
ok, I was able to get it working
Copy code
const cert = pulumi
  .all([certificate.keyVaultId, certificate.name])
  .apply(([keyVaultId, name]) =>
    azure.keyvault
      .getSecret({
        name,
        keyVaultId,
      })
      .then(
        (t) =>
          new Promise<pem.Pkcs12ReadResult>((resolve, reject) =>
            pem.readPkcs12(Buffer.from(t.value, "base64"), (err, res) => {
              if (err) {
                return reject(err);
              }
              return resolve(res);
            })
          )
      )
  );
👍 1
but if I change certificate configuration
it fails:
Copy code
Error: invocation of azure:keyvault/getSecret:getSecret returned an error: invoking azure:keyvault/getSecret:getSecret: KeyVault Secret "cert9055b425" (KeyVault URI "<https://keyvaulta3d2289a.vault.azure.net/>") does not exist
any ideas why?
getSecret
returns promise instead of pulumi.Output, this was also very confusing
any help on this topic?
@billowy-army-68599 any ideas why
pulumi
fails? as far as I understand, when I change the certificate or create it, `
Copy code
azure.keyvault.getSecret
is not awaiting for it
b
I'm not very familiar with this unfortunately, an issue in the azure github provider repo would be appreciated
i