Skip to content

Clarify how to access CosmosDB connection strings when pulled from Key Vault reference via Aspire components #2399

Answered by davidfowl
WhitWaldo asked this question in Q&A
Discussion options

You must be logged in to vote

It feels as though the documentation could be a lot clearer on how to securely use connection strings registered in the AppHost in downstream components. Ideally, I'd like to put my connection string in a secret in an Azure Key Vault instance and have everything automatically pull from that as downstream clients are initialized, but it's just not working as I'd expect and the lack of guidance in the documentation leaves me frustrated.

There's no support for pushing or pulling secrets into or from key vault from the apphost, at least not yet.

{
    "cosmosdb": "@Microsoft.KeyVault(SecretUri=https://<myvault>.vault.azure.net/secrets/connectionstrings-cosmosdb/)"
}

What component supports …

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by davidfowl
Comment options

You must be logged in to vote
2 replies
@davidfowl
Comment options

@davidfowl
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
2 participants
Converted from issue

This discussion was converted from issue #2397 on February 24, 2024 20:08.