Created
December 10, 2018 17:56
-
-
Save jessebarocio/3f61830bb06cd483ef7911fb02f5aaaf to your computer and use it in GitHub Desktop.
Sample ARM template with outputs
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
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"cosmosAccountName": { | |
"type": "string" | |
} | |
}, | |
"variables": { | |
"cosmosDbApiVersion": "2015-04-08" | |
}, | |
"resources": [ | |
{ | |
"apiVersion": "[variables('cosmosDbApiVersion')]", | |
"type": "Microsoft.DocumentDB/databaseAccounts", | |
"kind": "GlobalDocumentDB", | |
"name": "[parameters('cosmosAccountName')]", | |
"location": "[resourceGroup().location]", | |
"properties": { | |
"databaseAccountOfferType": "Standard", | |
"locations": [ | |
{ | |
"locationName": "[resourceGroup().location]", | |
"failoverPriority": 0 | |
} | |
] | |
} | |
} | |
], | |
"outputs": { | |
"cosmosAccountEndpoint": { | |
"type": "string", | |
"value": "[reference(concat('Microsoft.DocumentDB/databaseAccounts/', parameters('cosmosAccountName'))).documentEndpoint]" | |
}, | |
"cosmosAccountKey": { | |
"type": "string", | |
"value": "[listKeys(concat('Microsoft.DocumentDB/databaseAccounts/', parameters('cosmosAccountName')), variables('cosmosDbApiVersion')).primaryMasterKey]" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment