How do we get the URI in the Keys settings section for a cosmos database in a bicep script? #11837
Unanswered
crickard62
asked this question in
Q&A
Replies: 1 comment
-
I had success extracting the the Cosmos db uri by using this: |
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.
-
In the portal, the Keys section has 3 types of data: URI, Primary and Secondary Keys, and Primary and Secondary Connection strings
I can get a connection string by doing this:
var connectionString = databaseAccount.listConnectionStrings().connectionStrings[0].connectionString
And I can get a key by doing:
var primaryKey = databaseAccount.listKeys().primaryMasterKey
How do you get the URI?
There is no mention of URI in the documentation beyond the keyVaultKeyUri
Beta Was this translation helpful? Give feedback.
All reactions