Last active
August 24, 2018 02:23
-
-
Save garystafford/bfe844491eeb74b20cc698682c332681 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env sh | |
# author: Gary A. Stafford | |
# site: https://programmaticponderings.com | |
# license: MIT License | |
set -ex | |
LOCATION="<value_goes_here>" | |
RESOURCE_GROUP="<value_goes_here>" | |
ACCOUNT_NAME="<value_goes_here>" | |
COSMOS_ACCOUNT_KEY="<value_goes_here>" | |
DB_NAME="<value_goes_here>" | |
COLLECTION_NAME="<value_goes_here>" | |
az login | |
az cosmosdb create \ | |
--name ${ACCOUNT_NAME} \ | |
--resource-group ${RESOURCE_GROUP} \ | |
--location "East US=0" \ | |
--kind MongoDB | |
az cosmosdb database create \ | |
--name ${ACCOUNT_NAME} \ | |
--db-name ${DB_NAME} \ | |
--resource-group-name ${RESOURCE_GROUP} \ | |
az cosmosdb collection create \ | |
--collection-name ${COLLECTION_NAME} \ | |
--name ${ACCOUNT_NAME} \ | |
--db-name ${DB_NAME} \ | |
--resource-group-name ${RESOURCE_GROUP} \ | |
--throughput 400 \ | |
--key ${COSMOS_ACCOUNT_KEY}\ | |
--verbose --debug |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment