Skip to content

Commit

Permalink
requested fixes from comments
Browse files Browse the repository at this point in the history
  • Loading branch information
markjbrown committed Jul 3, 2019
1 parent 8ce4b47 commit 0df1b61
Show file tree
Hide file tree
Showing 13 changed files with 56 additions and 58 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

# Generate a unique 16 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 16 | head -n 1)
# Generate a unique 10 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 10 | head -n 1)

# Set variables for the new SQL API account, database, and container
resourceGroupName='myResourceGroup-'$uniqueId
resourceGroupName='myResourceGroup'
location='southcentralus'
accountName='mycosmosaccount-'$uniqueId #needs to be lower case
accountName="mycosmosaccount-$uniqueId" #needs to be lower case
databaseName='myDatabase'
containerName='myContainer'
partitionKeyPath='/myPartitionKey' #property to partition data on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

# NOTE: Support to provision Cassandra Tables is not supported at this time

# Generate a unique 16 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 16 | head -n 1)
# Generate a unique 10 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 10 | head -n 1)

# Set variables for the new Cassandra API account and keyspace
resourceGroupName='myResourceGroup-'$uniqueId
resourceGroupName='myResourceGroup'
location='southcentralus'
accountName='mycosmosaccount-'$uniqueId #needs to be lower case
accountName="mycosmosaccount-$uniqueId" #needs to be lower case
keyspaceName='myKeyspaceName'


Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

# Generate a unique 16 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 16 | head -n 1)
# Generate a unique 10 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 10 | head -n 1)

# Set variables for the new account, database, and graph
resourceGroupName='myResourceGroup-'$uniqueId
resourceGroupName='myResourceGroup'
location='southcentralus'
accountName='mycosmosaccount-'$uniqueId #needs to be lower case
accountName="mycosmosaccount-$uniqueId" #needs to be lower case
databaseName='myDatabase'
graphName='myGraph'
partitionKeyPath='/myPartitionKey' #property to partition data on
Expand Down Expand Up @@ -43,4 +43,4 @@ az cosmosdb collection create \
--db-name $databaseName \
--resource-group $resourceGroupName \
--partition-key-path $partitionKeyPath \
--throughput throughput
--throughput throughput
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

# Generate a unique 16 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 16 | head -n 1)
# Generate a unique 10 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 10 | head -n 1)

# Set variables for the new MongoDB API account and database
resourceGroupName='myResourceGroup-'$uniqueId
resourceGroupName='myResourceGroup'
location='southcentralus'
accountName='mycosmosaccount-'$uniqueId #needs to be lower case
accountName="mycosmosaccount-$uniqueId" #needs to be lower case
databaseName='myDatabase'
collectionName='myCollection'
partitionKeyPath='/myPartitionKey' #property to partition data on
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

# Generate a unique 16 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 16 | head -n 1)
# Generate a unique 10 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 10 | head -n 1)

# Set variables for the new Table API account, database, and table
resourceGroupName='myResourceGroup-'$uniqueId
resourceGroupName='myResourceGroup'
location='southcentralus'
accountName='mycosmosaccount-'$uniqueId #needs to be lower case
accountName="mycosmosaccount-$uniqueId" #needs to be lower case
databaseName='myDatabase'
tableName='myTable'
throughput=400
Expand Down Expand Up @@ -41,4 +41,4 @@ az cosmosdb collection create \
--collection-name $tableName \
--name $accountName \
--db-name $databaseName \
--throughput $throughput
--throughput $throughput
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

# Generate a unique 16 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 16 | head -n 1)
# Generate a unique 10 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 10 | head -n 1)

# Set variables for the new SQL API account
resourceGroupName='myResourceGroup-'$uniqueId
resourceGroupName='myResourceGroup'
location='southcentralus'
accountName='mycosmosaccount-'$uniqueId #needs to be lower case
accountName="mycosmosaccount-$uniqueId" #needs to be lower case


# Create a resource group
Expand All @@ -28,4 +28,4 @@ az cosmosdb create \
az cosmosdb update \
--name $accountName \
--resource-group $resourceGroupName \
--locations "South Central US"=0 "North Central US"=1 "East US 2"=2 "West US 2"=3
--locations "South Central US"=0 "North Central US"=1 "East US 2"=2 "West US 2"=3
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

# Generate a unique 16 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 16 | head -n 1)
# Generate a unique 10 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 10 | head -n 1)

# Set variables for the new SQL API account
resourceGroupName='myResourceGroup-'$uniqueId
resourceGroupName='myResourceGroup'
location='southcentralus'
accountName='mycosmosaccount-'$uniqueId #needs to be lower case
accountName="mycosmosaccount-$uniqueId" #needs to be lower case


# Create a resource group
Expand All @@ -27,4 +27,4 @@ az cosmosdb create \
# List account keys
az cosmosdb keys list \
--name $accountName \
--resource-group $resourceGroupName
--resource-group $resourceGroupName
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#!/bin/bash

# Generate a unique 16 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 16 | head -n 1)
# Generate a unique 10 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 10 | head -n 1)

# Set variables for the new SQL API account
resourceGroupName='myResourceGroup-'$uniqueId
resourceGroupName='myResourceGroup'
location='southcentralus'
accountName='mycosmosaccount-'$uniqueId #needs to be lower case

accountName="mycosmosaccount-$uniqueId" #needs to be lower case

# Create a resource group
az group create \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

# Generate a unique 16 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 16 | head -n 1)
# Generate a unique 10 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 10 | head -n 1)

# Set variables for the new SQL API account, database, and container
resourceGroupName='myResourceGroup-'$uniqueId
resourceGroupName='myResourceGroup'
location='southcentralus'
accountName='mycosmosaccount-'$uniqueId #needs to be lower case
accountName="mycosmosaccount-$uniqueId" #needs to be lower case
databaseName='myDatabase'
containerName='myContainer'
partitionKeyPath='/myPartitionKey' #property to partition data on
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

# Generate a unique 16 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 16 | head -n 1)
# Generate a unique 10 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 10 | head -n 1)

# Set variables for the new SQL API account, database, and container
resourceGroupName='myResourceGroup-'$uniqueId
resourceGroupName='myResourceGroup'
location='southcentralus'
accountName='mycosmosaccount-'$uniqueId #needs to be lower case
accountName="mycosmosaccount-$uniqueId" #needs to be lower case
ipRangeFilter="13.91.6.132,13.91.6.1/24"


Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#!/bin/bash

# Generate a unique 16 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 16 | head -n 1)
# Generate a unique 10 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 10 | head -n 1)

# Set variables for the new SQL API account, database, and container
resourceGroupName='myResourceGroup-'$uniqueId
resourceGroupName='myResourceGroup'
location='southcentralus'
accountName='mycosmosaccount-'$uniqueId #needs to be lower case

accountName="mycosmosaccount-$uniqueId" #needs to be lower case

# Create a resource group
az group create \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

# Generate a unique 16 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 16 | head -n 1)
# Generate a unique 10 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 10 | head -n 1)

# Set variables for the new MongoDB API account
resourceGroupName='myResourceGroup-'$uniqueId
resourceGroupName='myResourceGroup'
location='southcentralus'
accountName='mycosmosaccount-'$uniqueId #needs to be lower case
accountName="mycosmosaccount-$uniqueId" #needs to be lower case


# Create a resource group
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash

# Generate a unique 16 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 16 | head -n 1)
# Generate a unique 10 character alphanumeric string to ensure unique resource names
uniqueId=$(env LC_CTYPE=C tr -dc 'a-z0-9' < /dev/urandom | fold -w 10 | head -n 1)

# Set variables for the new SQL API account, database, and container
resourceGroupName='myResourceGroup-'$uniqueId
resourceGroupName='myResourceGroup'
location='southcentralus'
accountName='mycosmosaccount-'$uniqueId #needs to be lower case
accountName="mycosmosaccount-$uniqueId" #needs to be lower case


# Create a resource group
Expand Down

0 comments on commit 0df1b61

Please sign in to comment.