Repository navigation
Azure Provisioning In RunMode Creates resource group... #12119
|
Ok so we are moving existing applications to use Aspire. The next step is to pull in secrets from Azure Key Vault as per the documentation we are doing this using the code below var builder = DistributedApplication.CreateBuilder(args);
var existingKeyVaultName = builder.AddParameter("key-vault-name",value: "my-key-vault");
var existingKeyVaultResourceGroup = builder.AddParameter("rg-name", value: "my-resource-group");
var keyvault = builder.AddAzureKeyVault("my-keyvault")
.AsExisting(existingKeyVaultName, existingKeyVaultResourceGroup);
var dataBentoApiKey = keyvault.GetSecret("MySecret");`Then supplying the Azure config in the appsettings.json like below. "Azure": {
"ResourceGroup": "my-resource-group",
"SubscriptionId": "MySubId",
"AllowResourceGroupCreation": false,
"Location": "UK South"
}When I Thanks |
Answered by
jpapa020
Oct 17, 2025
Replies: 1 comment
|
Found the issue, It had stored some incorrect secrets previously where the Resource group was not set, once I cleared these secrets and ran again it all worked as expected |
0 replies
Answer selected by
jpapa020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Found the issue, It had stored some incorrect secrets previously where the Resource group was not set, once I cleared these secrets and ran again it all worked as expected