C
C#2y ago
Dreams

❔ How to connect to Azure Key Vault from external VPS?

Instructions for Azure VM was two lines of "Azure code" I'm now using a VM from a third party, is it even possible anymore to keep using Azure Key Vault?
3 Replies
Dreams
DreamsOP2y ago
this is in my Program.cs:
if (builder.Environment.IsProduction())
{
builder.Configuration.AddAzureKeyVault(
new Uri($"https://{builder.Configuration["KeyVaultName"]}.vault.azure.net/"),
new DefaultAzureCredential());
}
if (builder.Environment.IsProduction())
{
builder.Configuration.AddAzureKeyVault(
new Uri($"https://{builder.Configuration["KeyVaultName"]}.vault.azure.net/"),
new DefaultAzureCredential());
}
Saber
Saber2y ago
You'd need to use a client id/secret for the keyvault with an app registration, or maybe have that vps signed into the azure cli with a service principal
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server