Azure resources are deployed using the Azure Resource Manager (ARM) templates supplied in asset relay-arm. For more information about ARM templates and deployment best practices (CI/CD), see the Azure Resource Manager template documentation.
Gateway resources deployment consists of creating/updating the following Azure resources:
You can skip this step and refer to existing resources in your subscription if you already have an Azure IoT Hub ready to go.
NOTE: Azure IoT Hub Basic tier is not supported.
For more information, see IoT Hub quotas, throttling and limitations documentation.
Example Request:
az group create --name rg-cloudrelaygateway --location "East US"
Example Response:
PS C:\Users\dcts0859> az group create --name rg-cloudrelaygateway --location "East US"
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaygateway",
"location": "eastus",
"managedBy": null,
"name": "rg-cloudrelaygateway",
"properties": {
"provisioningState": "Succeeded"
},
"tags": null,
"type": "Microsoft.Resources/resourceGroups"
}
NOTE:For the next steps you will need to download the relay-arm zip file from the DistechControls GitHub page.
Extract the relay-arm zip file to your Desktop. The location of the extracted files on your system does not matter as long as you have permissions to access the files and the directory they are in. For the purposes of this example they will be placed on the desktop of the user in a folder named Distech-AzureIOT.
Navigate to the directory named Gateway
in the folder structure of the extracted files using PowerShell.
Example Request:
cd .\Desktop\Distech-AzureIOT\relay-arm\Gateway\
Example Response:
PS C:\Users\dcts0859> cd .\Desktop\Distech-AzureIOT\relay-arm\Gateway\
PS C:\Users\dcts0859\Desktop\Distech-AzureIOT\relay-arm\Gateway>
Verify that the files needed for this step in the deployment are present in the directory by running the follow command
Example Request:
ls
Example Response:
PS C:\Users\dcts0859\Desktop\Distech-AzureIOT\relay-arm\Gateway> ls
Directory: C:\Users\dcts0859\Desktop\Distech-AzureIOT\relay-arm\Gateway
Mode LastWriteTime Length Name
---- ------------- ------ ----
------ 3/31/2020 1:51 PM 5406 Distech.CloudRelay.Gateway.json
------ 3/31/2020 1:51 PM 161 Distech.CloudRelay.Gateway.Parameters.json
If your response looks like the one above then move on to the next step.
In this step of the deployment you will be asked to provide the following:
Parameter | Type | Min Length | Max Length | Metadata |
---|---|---|---|---|
iotHubName | string | 3 | 50 | The name of the Azure IoT Hub acting as a gateway to communicate with the devices. The name can contain alphanumeric characters and hyphens. |
storageAccountName | string | 3 | 24 | The name of storage account resource containing blobs shared through the IoT Hub with devices. The name can contain lowercase letters and numbers. |
Example Request:
az group deployment create `
--handle-extended-json-format `
--name CloudRelayGatewayDeployment `
--resource-group rg-cloudrelaygateway `
--template-file Distech.CloudRelay.Gateway.json `
--parameters Distech.CloudRelay.Gateway.Parameters.json
Example Response:
PS C:\Users\dcts0859\Desktop\Distech-AzureIOT\relay-arm\Gateway> az group deployment create `
>> --handle-extended-json-format `
>> --name CloudRelayGatewayDeployment `
>> --resource-group rg-cloudrelaygateway `
>> --template-file Distech.CloudRelay.Gateway.json `
>> --parameters Distech.CloudRelay.Gateway.Parameters.json
Option '--handle-extended-json-format/-j' has been deprecated and will be removed in a future release.
This command is implicitly deprecated because command group 'group deployment' is deprecated and will be removed in a future release. Use 'deployment group' instead.
Please provide string value for 'iotHubName' (? for help): dctsdemo
Please provide string value for 'storageAccountName' (? for help): dctsdemostorage
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaygateway/providers/Microsoft.Resources/deployments/CloudRelayGatewayDeployment",
"location": null,
"name": "CloudRelayGatewayDeployment",
"properties": {
"correlationId": "bb80ad2f-f89e-1234-1234-9a6123456789",
"debugSetting": null,
"dependencies": [
{
"dependsOn": [
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaygateway/providers/Microsoft.Storage/storageAccounts/dctsdemostorage",
"resourceGroup": "rg-cloudrelaygateway",
"resourceName": "dctsdemostorage",
"resourceType": "Microsoft.Storage/storageAccounts"
}
],
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaygateway/providers/Microsoft.Storage/storageAccounts/dctsdemostorage/blobServices/default/containers/iothub-fileupload",
"resourceGroup": "rg-cloudrelaygateway",
"resourceName": "dctsdemostorage/default/iothub-fileupload",
"resourceType": "Microsoft.Storage/storageAccounts/blobServices/containers"
},
{
"dependsOn": [
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaygateway/providers/Microsoft.Storage/storageAccounts/dctsdemostorage",
"resourceGroup": "rg-cloudrelaygateway",
"resourceName": "dctsdemostorage",
"resourceType": "Microsoft.Storage/storageAccounts"
}
],
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaygateway/providers/Microsoft.Storage/storageAccounts/dctsdemostorage/blobServices/default/containers/cloud-relay-fileupload",
"resourceGroup": "rg-cloudrelaygateway",
"resourceName": "dctsdemostorage/default/cloud-relay-fileupload",
"resourceType": "Microsoft.Storage/storageAccounts/blobServices/containers"
},
{
"dependsOn": [
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaygateway/providers/Microsoft.Storage/storageAccounts/dctsdemostorage",
"resourceGroup": "rg-cloudrelaygateway",
"resourceName": "dctsdemostorage",
"resourceType": "Microsoft.Storage/storageAccounts"
},
{
"actionName": "listKeys",
"apiVersion": "2019-04-01",
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaygateway/providers/Microsoft.Storage/storageAccounts/dctsdemostorage",
"resourceGroup": "rg-cloudrelaygateway",
"resourceName": "dctsdemostorage",
"resourceType": "Microsoft.Storage/storageAccounts"
}
],
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaygateway/providers/Microsoft.Devices/IotHubs/dctsdemo",
"resourceGroup": "rg-cloudrelaygateway",
"resourceName": "dctsdemo",
"resourceType": "Microsoft.Devices/IotHubs"
},
{
"dependsOn": [
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaygateway/providers/Microsoft.Devices/IotHubs/dctsdemo",
"resourceGroup": "rg-cloudrelaygateway",
"resourceName": "dctsdemo",
"resourceType": "Microsoft.Devices/IotHubs"
}
],
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaygateway/providers/Microsoft.Devices/IotHubs/dctsdemo/eventHubEndpoints/events/ConsumerGroups/scheduled-calls",
"resourceGroup": "rg-cloudrelaygateway",
"resourceName": "dctsdemo/events/scheduled-calls",
"resourceType": "Microsoft.Devices/IotHubs/eventHubEndpoints/ConsumerGroups"
}
],
"duration": "PT2M46.4822517S",
"error": null,
"mode": "Incremental",
"onErrorDeployment": null,
"outputResources": [
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaygateway/providers/Microsoft.Devices/IotHubs/dctsdemo",
"resourceGroup": "rg-cloudrelaygateway"
},
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaygateway/providers/Microsoft.Devices/IotHubs/dctsdemo/eventHubEndpoints/events/ConsumerGroups/scheduled-calls",
"resourceGroup": "rg-cloudrelaygateway"
},
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaygateway/providers/Microsoft.Storage/storageAccounts/dctsdemostorage",
"resourceGroup": "rg-cloudrelaygateway"
},
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaygateway/providers/Microsoft.Storage/storageAccounts/dctsdemostorage/blobServices/default/containers/cloud-relay-fileupload",
"resourceGroup": "rg-cloudrelaygateway"
},
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaygateway/providers/Microsoft.Storage/storageAccounts/dctsdemostorage/blobServices/default/containers/iothub-fileupload",
"resourceGroup": "rg-cloudrelaygateway"
}
],
"outputs": {},
"parameters": {
"cloudToDeviceFileContainerName": {
"type": "String",
"value": "cloud-relay-fileupload"
},
"deviceToCloudFileContainerName": {
"type": "String",
"value": "iothub-fileupload"
},
"iotHubCapacityUnits": {
"type": "Int",
"value": 1
},
"iotHubName": {
"type": "String",
"value": "dctsdemo"
},
"iotHubSkuName": {
"type": "String",
"value": "S1"
},
"scheduledCallsConsumerGroupName": {
"type": "String",
"value": "scheduled-calls"
},
"storageAccountName": {
"type": "String",
"value": "dctsdemostorage"
}
},
"parametersLink": null,
"providers": [
{
"id": null,
"namespace": "Microsoft.Storage",
"registrationPolicy": null,
"registrationState": null,
"resourceTypes": [
{
"aliases": null,
"apiProfiles": null,
"apiVersions": null,
"capabilities": null,
"defaultApiVersion": null,
"locations": [
"eastus"
],
"properties": null,
"resourceType": "storageAccounts"
},
{
"aliases": null,
"apiProfiles": null,
"apiVersions": null,
"capabilities": null,
"defaultApiVersion": null,
"locations": [
null
],
"properties": null,
"resourceType": "storageAccounts/blobServices/containers"
}
]
},
{
"id": null,
"namespace": "Microsoft.Devices",
"registrationPolicy": null,
"registrationState": null,
"resourceTypes": [
{
"aliases": null,
"apiProfiles": null,
"apiVersions": null,
"capabilities": null,
"defaultApiVersion": null,
"locations": [
"eastus"
],
"properties": null,
"resourceType": "IotHubs"
},
{
"aliases": null,
"apiProfiles": null,
"apiVersions": null,
"capabilities": null,
"defaultApiVersion": null,
"locations": [
null
],
"properties": null,
"resourceType": "IotHubs/eventHubEndpoints/ConsumerGroups"
}
]
}
],
"provisioningState": "Succeeded",
"templateHash": "9873743531512613549",
"templateLink": null,
"timestamp": "2020-11-28T21:59:54.397704+00:00",
"validatedResources": null
},
"resourceGroup": "rg-cloudrelaygateway",
"tags": null,
"type": "Microsoft.Resources/deployments"
}
NOTE: Please record the
iotHubName
andstorageAccountName
used in the command above.
You will need these parameters in the following steps.
NOTE: Please record the string in the response above that comes after
"id":"/subscriptions/
.
This is your SubscriptionID. You will need this string in the following steps.
At this point you should have recorded SubscriptionID, TenantID, ScopeID, ClientID, ClientSecret, iotHubName and storageAccountName. If If you have this information then you are ready to move on to the next step "Compute Resources"
Compute resources deployment consists of creating/updating the following Azure resources:
Example Request:
az group create --name rg-cloudrelaycompute --location "East US"
Example Response:
PS C:\Users\dcts0859\Desktop\Distech-AzureIOT\relay-arm\Compute> az group create --name rg-cloudrelaycompute --location "East US"
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute",
"location": "eastus",
"managedBy": null,
"name": "rg-cloudrelaycompute",
"properties": {
"provisioningState": "Succeeded"
},
"tags": null,
"type": "Microsoft.Resources/resourceGroups"
}
Navigate to the directory named Compute
in the folder structure of the extracted files using PowerShell.
Example Request:
cd ..\Compute
or if starting from user home
cd .\Desktop\Distech-AzureIOT\relay-arm\Compute\
Example Response:
PS C:\Users\dcts0859\Desktop\Distech-AzureIOT\relay-arm> cd .\Gateway\
PS C:\Users\dcts0859\Desktop\Distech-AzureIOT\relay-arm\Gateway> cd ..\Compute
Verify that the files needed for this step in the deployment are present in the directory by running the follow command
Example Request:
ls
Example Response:
PS C:\Users\dcts0859\Desktop\Distech-AzureIOT\relay-arm\Compute> ls
Directory: C:\Users\dcts0859\Desktop\Distech-AzureIOT\relay-arm\Compute
Mode LastWriteTime Length Name
---- ------------- ------ ----
------ 3/31/2020 1:51 PM 20381 Distech.CloudRelay.Compute.json
------ 3/31/2020 1:51 PM 245 Distech.CloudRelay.Compute.Parameters.json
In this step of the deployment you will be asked to provide the following:
Parameter | Type | Min Length | Max Length | Metadata |
---|---|---|---|---|
azureAdTenantId | string | 36 | 36 | The tenant ID of the Azure Active Directory used to authenticate Cloud Relay requests. NOTE: This is the TenantID you recorded earlier |
azureAdClientId | string | 36 | 36 | The client ID of the Cloud Relay app registration in the Azure Active Directory used to authenticate Cloud Relay requests. NOTE: This is the ScopeID you recorded earlier |
iotHubName | string | 3 | 50 | The name of the IoT Hub resource used to communicate with devices. NOTE: This is the iotHubName you recorded earlier |
iotHubStorageAccountName | string | 3 | 24 | The name of the storage account resource containing blobs shared through the IoT Hub with devices. NOTE: This is the storageAccountName you recorded earlier |
applicationInsightsName | string | 255 | The name of the application insights to deploy as part of the Cloud Relay. The name can contain alphanumeric characters, periods, underscores, hyphens and parenthesis. No resource will be created if 'applicationInsightsKey' was set instead. | |
hostingPlanName | string | 1 | 40 | The name of the hosting plan for the Cloud Relay. The name can contain alphanumeric characters and hyphens. No resource will be created if 'hostingPlanResourceGroupName' was also set. |
webSiteName | string | 2 | 60 | The name of the wep app hosting the Cloud Relay. The name can contain alphanumeric characters and hyphens. |
consumptionHostingPlanName | string | 1 | 40 | The name of the consumption plan used to run Azure Functions related to the Cloud Relay. The name can contain alphanumeric characters, underscores and hyphens. |
functionAppName | string | 2 | 60 | The name of the function app running Azure Functions related to the Cloud Relay. The name can contain alphanumeric characters only. |
functionAppStorageAccountName | string | 3 | 24 | The name of the storage account associated to the function app. The name can contain lowercase letters and numbers. |
Example Request:
az group deployment create `
--handle-extended-json-format `
--name CloudRelayComputeDeployment `
--resource-group rg-cloudrelaycompute `
--template-file Distech.CloudRelay.Compute.json `
--parameters Distech.CloudRelay.Compute.Parameters.json
Example Response:
PS C:\Users\dcts0859\Desktop\Distech-AzureIOT\relay-arm\Compute> az group deployment create `
>> --handle-extended-json-format `
>> --name CloudRelayComputeDeployment `
>> --resource-group rg-cloudrelaycompute `
>> --template-file Distech.CloudRelay.Compute.json `
>> --parameters Distech.CloudRelay.Compute.Parameters.json
Option '--handle-extended-json-format/-j' has been deprecated and will be removed in a future release.
This command is implicitly deprecated because command group 'group deployment' is deprecated and will be removed in a future release. Use 'deployment group' instead.
Please provide string value for 'azureAdTenantId' (? for help): 094a4238-1234-1234-1234-154123456789
Please provide string value for 'azureAdClientId' (? for help): 3e8e0ac5-1234-1234-1234-a71123456789
Please provide string value for 'iotHubName' (? for help): dctsdemo
Please provide string value for 'iotHubStorageAccountName' (? for help): dctsdemostorage
Please provide string value for 'applicationInsightsName' (? for help): dctsdemoinsights
Please provide string value for 'hostingPlanName' (? for help): dctsdemoplan
Please provide string value for 'webSiteName' (? for help): dctsdemowebsite
Please provide string value for 'consumptionHostingPlanName' (? for help): dctsdemocomsumption
Please provide string value for 'functionAppName' (? for help): dctsdemofunction
Please provide string value for 'functionAppStorageAccountName' (? for help): dctsdemofstorage
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Resources/deployments/CloudRelayComputeDeployment",
"location": null,
"name": "CloudRelayComputeDeployment",
"properties": {
"correlationId": "83ee7061-1234-1234-1234-546123456789",
"debugSetting": null,
"dependencies": [
{
"dependsOn": [
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Web/serverfarms/dctsdemoplan",
"resourceGroup": "rg-cloudrelaycompute",
"resourceName": "dctsdemoplan",
"resourceType": "Microsoft.Web/serverfarms"
},
{
"apiVersion": "2016-09-01",
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Web/serverfarms/dctsdemoplan",
"resourceGroup": "rg-cloudrelaycompute",
"resourceName": "dctsdemoplan",
"resourceType": "Microsoft.Web/serverfarms"
}
],
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Web/sites/dctsdemowebsite",
"resourceGroup": "rg-cloudrelaycompute",
"resourceName": "dctsdemowebsite",
"resourceType": "Microsoft.Web/sites"
},
{
"dependsOn": [
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Web/sites/dctsdemowebsite",
"resourceGroup": "rg-cloudrelaycompute",
"resourceName": "dctsdemowebsite",
"resourceType": "Microsoft.Web/sites"
},
{
"apiVersion": "2015-05-01",
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Insights/components/dctsdemoinsights",
"resourceGroup": "rg-cloudrelaycompute",
"resourceName": "dctsdemoinsights",
"resourceType": "Microsoft.Insights/components"
},
{
"apiVersion": "2018-04-01",
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaygateway/providers/Microsoft.Devices/Iothubs/dctsdemo",
"resourceGroup": "rg-cloudrelaygateway",
"resourceName": "dctsdemo",
"resourceType": "Microsoft.Devices/Iothubs"
}
],
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Web/sites/dctsdemowebsite/config/appsettings",
"resourceGroup": "rg-cloudrelaycompute",
"resourceName": "dctsdemowebsite/appsettings",
"resourceType": "Microsoft.Web/sites/config"
},
{
"dependsOn": [
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Web/sites/dctsdemowebsite",
"resourceGroup": "rg-cloudrelaycompute",
"resourceName": "dctsdemowebsite",
"resourceType": "Microsoft.Web/sites"
},
{
"apiVersion": "2018-04-01",
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaygateway/providers/Microsoft.Devices/Iothubs/dctsdemo",
"resourceGroup": "rg-cloudrelaygateway",
"resourceName": "dctsdemo",
"resourceType": "Microsoft.Devices/Iothubs"
},
{
"actionName": "listKeys",
"apiVersion": "2018-04-01",
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaygateway/providers/Microsoft.Devices/Iothubs/dctsdemo/IotHubKeys/service",
"resourceGroup": "rg-cloudrelaygateway",
"resourceName": "dctsdemo/service",
"resourceType": "Microsoft.Devices/Iothubs/IotHubKeys"
},
{
"actionName": "listKeys",
"apiVersion": "2019-04-01",
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaygateway/providers/Microsoft.Storage/storageAccounts/dctsdemostorage",
"resourceGroup": "rg-cloudrelaygateway",
"resourceName": "dctsdemostorage",
"resourceType": "Microsoft.Storage/storageAccounts"
}
],
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Web/sites/dctsdemowebsite/config/connectionstrings",
"resourceGroup": "rg-cloudrelaycompute",
"resourceName": "dctsdemowebsite/connectionstrings",
"resourceType": "Microsoft.Web/sites/config"
},
{
"dependsOn": [
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Web/serverfarms/dctsdemoplan",
"resourceGroup": "rg-cloudrelaycompute",
"resourceName": "dctsdemoplan",
"resourceType": "Microsoft.Web/serverfarms"
}
],
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Insights/autoscalesettings/dctsdemoplan-rg-cloudrelaycompute",
"resourceGroup": "rg-cloudrelaycompute",
"resourceName": "dctsdemoplan-rg-cloudrelaycompute",
"resourceType": "Microsoft.Insights/autoscalesettings"
},
{
"dependsOn": [
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Web/serverfarms/dctsdemocomsumption",
"resourceGroup": "rg-cloudrelaycompute",
"resourceName": "dctsdemocomsumption",
"resourceType": "Microsoft.Web/serverfarms"
},
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Storage/storageAccounts/dctsdemofstorage",
"resourceGroup": "rg-cloudrelaycompute",
"resourceName": "dctsdemofstorage",
"resourceType": "Microsoft.Storage/storageAccounts"
},
{
"actionName": "listKeys",
"apiVersion": "2019-04-01",
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Storage/storageAccounts/dctsdemofstorage",
"resourceGroup": "rg-cloudrelaycompute",
"resourceName": "dctsdemofstorage",
"resourceType": "Microsoft.Storage/storageAccounts"
},
{
"apiVersion": "2015-05-01",
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Insights/components/dctsdemoinsights",
"resourceGroup": "rg-cloudrelaycompute",
"resourceName": "dctsdemoinsights",
"resourceType": "Microsoft.Insights/components"
},
{
"actionName": "listKeys",
"apiVersion": "2019-04-01",
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaygateway/providers/Microsoft.Storage/storageAccounts/dctsdemostorage",
"resourceGroup": "rg-cloudrelaygateway",
"resourceName": "dctsdemostorage",
"resourceType": "Microsoft.Storage/storageAccounts"
},
{
"apiVersion": "2018-04-01",
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaygateway/providers/Microsoft.Devices/Iothubs/dctsdemo",
"resourceGroup": "rg-cloudrelaygateway",
"resourceName": "dctsdemo",
"resourceType": "Microsoft.Devices/Iothubs"
}
],
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Web/sites/dctsdemofunction",
"resourceGroup": "rg-cloudrelaycompute",
"resourceName": "dctsdemofunction",
"resourceType": "Microsoft.Web/sites"
}
],
"duration": "PT3M12.8335734S",
"error": null,
"mode": "Incremental",
"onErrorDeployment": null,
"outputResources": [
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Insights/components/dctsdemoinsights",
"resourceGroup": "rg-cloudrelaycompute"
},
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Storage/storageAccounts/dctsdemofstorage",
"resourceGroup": "rg-cloudrelaycompute"
},
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Web/serverfarms/dctsdemocomsumption",
"resourceGroup": "rg-cloudrelaycompute"
},
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Web/serverfarms/dctsdemoplan",
"resourceGroup": "rg-cloudrelaycompute"
},
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Web/sites/dctsdemofunction",
"resourceGroup": "rg-cloudrelaycompute"
},
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Web/sites/dctsdemowebsite",
"resourceGroup": "rg-cloudrelaycompute"
},
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Web/sites/dctsdemowebsite/config/appsettings",
"resourceGroup": "rg-cloudrelaycompute"
},
{
"id": "/subscriptions/9d123456-1234-1234-1234-459123456789/resourceGroups/rg-cloudrelaycompute/providers/Microsoft.Web/sites/dctsdemowebsite/config/connectionstrings",
"resourceGroup": "rg-cloudrelaycompute"
}
],
"outputs": {},
"parameters": {
"applicationInsightsKey": {
"type": "String",
"value": ""
},
"applicationInsightsName": {
"type": "String",
"value": "dctsdemoinsights"
},
"azureAdClientId": {
"type": "String",
"value": "3e8e0ac5-1234-1234-1234-a71123456789"
},
"azureAdTenantId": {
"type": "String",
"value": "094a4238-1234-1234-1234-154123456789"
},
"cloudToDeviceFileContainerName": {
"type": "String",
"value": "cloud-relay-fileupload"
},
"consumptionHostingPlanName": {
"type": "String",
"value": "dctsdemocomsumption"
},
"functionAppName": {
"type": "String",
"value": "dctsdemofunction"
},
"functionAppStorageAccountName": {
"type": "String",
"value": "dctsdemofstorage"
},
"hostingPlanName": {
"type": "String",
"value": "dctsdemoplan"
},
"hostingPlanResourceGroupName": {
"type": "String",
"value": ""
},
"hostingPlanSkuName": {
"type": "String",
"value": "B1"
},
"iotHubName": {
"type": "String",
"value": "dctsdemo"
},
"iotHubResourceGroupName": {
"type": "String",
"value": "rg-cloudrelaygateway"
},
"iotHubServicePolicyName": {
"type": "String",
"value": "service"
},
"iotHubStorageAccountName": {
"type": "String",
"value": "dctsdemostorage"
},
"iotHubStorageAccountResourceGroupName": {
"type": "String",
"value": "rg-cloudrelaygateway"
},
"webSiteName": {
"type": "String",
"value": "dctsdemowebsite"
}
},
"parametersLink": null,
"providers": [
{
"id": null,
"namespace": "Microsoft.Storage",
"registrationPolicy": null,
"registrationState": null,
"resourceTypes": [
{
"aliases": null,
"apiProfiles": null,
"apiVersions": null,
"capabilities": null,
"defaultApiVersion": null,
"locations": [
"eastus"
],
"properties": null,
"resourceType": "storageAccounts"
}
]
},
{
"id": null,
"namespace": "Microsoft.Web",
"registrationPolicy": null,
"registrationState": null,
"resourceTypes": [
{
"aliases": null,
"apiProfiles": null,
"apiVersions": null,
"capabilities": null,
"defaultApiVersion": null,
"locations": [
"eastus"
],
"properties": null,
"resourceType": "serverfarms"
},
{
"aliases": null,
"apiProfiles": null,
"apiVersions": null,
"capabilities": null,
"defaultApiVersion": null,
"locations": [
"eastus"
],
"properties": null,
"resourceType": "sites"
},
{
"aliases": null,
"apiProfiles": null,
"apiVersions": null,
"capabilities": null,
"defaultApiVersion": null,
"locations": [
null
],
"properties": null,
"resourceType": "sites/config"
}
]
},
{
"id": null,
"namespace": "Microsoft.Insights",
"registrationPolicy": null,
"registrationState": null,
"resourceTypes": [
{
"aliases": null,
"apiProfiles": null,
"apiVersions": null,
"capabilities": null,
"defaultApiVersion": null,
"locations": [
"eastus"
],
"properties": null,
"resourceType": "components"
}
]
}
],
"provisioningState": "Succeeded",
"templateHash": "3721263686409885811",
"templateLink": null,
"timestamp": "2020-11-29T01:01:19.068981+00:00",
"validatedResources": null
},
"resourceGroup": "rg-cloudrelaycompute",
"tags": null,
"type": "Microsoft.Resources/deployments"
}
NOTE: Please record the
webSiteName
andfunctionAppName
used in the command above.
We will refer to these values as CloudRelayWebsite and CloudRelayFunction in this wiki.
At this point you should have recorded CloudRelayFunction, CloudRelayWebsite, SubscriptionID, TenantID, ScopeID, ClientID, ClientSecret, iotHubName and storageAccountName. Please store this information securely. It should only be shared with those who are intended to have administrative privelages.