Replies: 1 comment
-
In development if you are using an existing keyvault then you can type: var secrets =
builder.ExecutionContext.IsPublishMode
? builder.AddAzureKeyVault("secrets")
: builder.AddConnectionString("secrets"); This says, using an existing keyvault when running, but then provision a keyvault when we publish. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Folks,
I'm trying to reference an Azure Key Vaults with the Aspire Security.KeyVault package (Preview 4).
AddAzureKeyVaultSecrets()
is missing in packageAspire.Azure.Security.KeyVault
, though it's mentioned in the docs.Also,
Aspire.Hosting/Extensions/ResourceBuilderExtensions.cs
throws an exception because it's not finding vaultUrl in appsettings.json.Is this a known issue, or am I making a rookie mistake here? :-)
Sample AppHost\Program.cs
var secrets = builder.AddAzureKeyVault("secrets");
Sample AppHost\appSettings.json
Beta Was this translation helpful? Give feedback.
All reactions