https://pulumi.com logo
Title
s

swift-island-2275

01/06/2023, 3:45 PM
Hi, I am trying to get an Azure KeyVault Secret in Pulumi stack. I know that ARM API doesn't allow to do that, therefore we need to use "Data SDK". Here it's mentioned that we can use
GetClientConfig
and
GetClientToken
together with correct SDK to get it working. However, it seems that the token returned from
GetClienToken
has different audience. When I run the code, I get an error:
{
  "error": {
    "code": "Unauthorized",
    "message": "AKV10022: Invalid audience. Expected <https://vault.azure.net>, found: <https://management.azure.com/>."
  }
}
I understand the message, however I am wondering how to get a token with correct audience. Any suggestions ?
i

icy-doctor-13719

01/06/2023, 3:58 PM
i’m able to get an azure keyvault secret in my pulumi stack …
probably should ask this in #azure
s

swift-island-2275

01/06/2023, 4:49 PM
I guess you are using Azure Classic ?
i

icy-doctor-13719

01/06/2023, 4:49 PM
AzureNative
s

swift-island-2275

01/06/2023, 5:36 PM
can you show some code ?