Created
January 4, 2018 11:33
-
-
Save justinyoo/90addf3243a1368133cf5c56f5e42c5b to your computer and use it in GitHub Desktop.
List of Access Keys from Output Values after ARM Template Deployment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"variables": { | |
"cosmosDbAccount": { | |
"name": "my-cosmos-db" | |
}, | |
"resourceId": "[resourceId('Microsoft.DocumentDB/databaseAccounts', variables('cosmosDbAccount').name)]", | |
"apiVersion": "[providers('Microsoft.DocumentDB', 'databaseAccounts').apiVersions[0]]" | |
}, | |
"resources": [], | |
"outputs": { | |
"documentEndpoint": { | |
"type": "string", | |
"value": "[reference(variables('resourceId'), variables('apiVersion')).documentEndpoint]" | |
}, | |
"accountKey": { | |
"type": "string", | |
"value": "[listKeys(variables('resourceId'), variables('apiVersion')).primaryMasterKey]" | |
}, | |
"connectionString": { | |
"type": "string", | |
"value": "[concat('AccountEndpoint=https://', variables('cosmosDbAccount').name, '.documents.azure.com:443/;AccountKey=', listKeys(variables('resourceId'), variables('apiVersion')).primaryMasterKey, ';')]" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment