-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathaz_cmd_createInventoryEventHubs_eastus.sh
14 lines (11 loc) · 1.59 KB
/
az_cmd_createInventoryEventHubs_eastus.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
if [ "$INVENTORY_HUB_APP_NAME" == "" ]; then echo "Unexpected error: environment variable INVENTORY_HUB_APP_NAME is not defined. Exiting..." && exit 1
fi
echo "Using ""$INVENTORY_HUB_APP_NAME"" as a prefix for the names of the resources to be created"
# EventHub in "eastus"
az group create --name "$INVENTORY_HUB_APP_NAME""-eastus-dev" --location "eastus"
az group deployment create --name "$INVENTORY_HUB_APP_NAME""-eventhub-eastus-td1" --resource-group "$INVENTORY_HUB_APP_NAME""-eastus-dev" --template-file createInventoryEventHub.json --parameters namespace_name="$INVENTORY_HUB_APP_NAME""-eventhub-eastus" region_name="eastus"
# List authorization rule keys and connection strings
az eventhubs eventhub authorization-rule keys list --resource-group "$INVENTORY_HUB_APP_NAME""-eastus-dev" --namespace-name "$INVENTORY_HUB_APP_NAME""-eventhub-eastus" --eventhub-name "eventhub-for-notifications" --name "intakeEvents"
az eventhubs eventhub authorization-rule keys list --resource-group "$INVENTORY_HUB_APP_NAME""-eastus-dev" --namespace-name "$INVENTORY_HUB_APP_NAME""-eventhub-eastus" --eventhub-name "eventhub-for-notifications" --name "dispatchEvents"
az eventhubs eventhub authorization-rule keys list --resource-group "$INVENTORY_HUB_APP_NAME""-eastus-dev" --namespace-name "$INVENTORY_HUB_APP_NAME""-eventhub-eastus" --eventhub-name "eventhub-for-transactions" --name "intakeEvents"
az eventhubs eventhub authorization-rule keys list --resource-group "$INVENTORY_HUB_APP_NAME""-eastus-dev" --namespace-name "$INVENTORY_HUB_APP_NAME""-eventhub-eastus" --eventhub-name "eventhub-for-transactions" --name "dispatchEvents"