Skip to content

Bicep Quickstart Template Deployment Does Not Work. #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bdlb77 opened this issue Apr 29, 2025 · 1 comment · May be fixed by #125
Open

Bicep Quickstart Template Deployment Does Not Work. #124

bdlb77 opened this issue Apr 29, 2025 · 1 comment · May be fixed by #125

Comments

@bdlb77
Copy link

bdlb77 commented Apr 29, 2025

When Attempting to run the quickstart bicep template from here:

https://learn.microsoft.com/en-us/azure/iot-operations/get-started-end-to-end-sample/quickstart-configure?tabs=bash#configure-your-cluster

I get the following error:

 wget https://raw.githubusercontent.com/Azure-Samples/explore-iot-operations/main/samples/quickstarts/quickstart.bicep -O quickstart.bicep

AIO_EXTENSION_NAME=$(az k8s-extension list -g $RESOURCE_GROUP --cluster-name $CLUSTER_NAME --cluster-type connectedClusters --query "[?extensionType == 'microsoft.iotoperations'].id" -o tsv | awk -F'/' '{print $NF}')
AIO_INSTANCE_NAME=$(az iot ops list -g $RESOURCE_GROUP --query "[0].name" -o tsv)
CUSTOM_LOCATION_NAME=$(az iot ops list -g $RESOURCE_GROUP --query "[0].extendedLocation.name" -o tsv | awk -F'/' '{print $NF}')

az deployment group create --subscription $SUBSCRIPTION_ID --resource-group $RESOURCE_GROUP --template-file quickstart.bicep --parameters clusterName=$CLUSTER_NAME customLocationName=$CUSTOM_LOCATION_NAME aioExtensionName=$AIO_EXTENSION_NAME aioInstanceName=$AIO_INSTANCE_NAME
--2025-04-11 21:08:34--  https://raw.githubusercontent.com/Azure-Samples/explore-iot-operations/main/samples/quickstarts/quickstart.bicep
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8345 (8.1K) [text/plain]
Saving to: ‘quickstart.bicep’

quickstart.bicep                       100%[==========================================================================>]   8.15K  --.-KB/s    in 0.002s  

2025-04-11 21:08:34 (4.71 MB/s) - ‘quickstart.bicep’ saved [8345/8345]

The configuration value of bicep.use_binary_from_path has been set to 'false'.
WARNING: The following experimental Bicep features have been enabled: Extensibility, Secure outputs. Experimental features should be enabled for testing purposes only, as there are no guarantees about the quality or stability of these features. Do not enable these settings for any production usage, or your production environment may be subject to breaking.

{"code": "InvalidTemplate", "message": "Deployment template validation failed: 'The template resource 'default' for type 'Microsoft.IoTOperations/instances/dataflowEndpoints' at line '82' and column '67' has incorrect segment lengths. A nested resource type must have identical number of segments as its resource name. A root resource type must have segment length one greater than its resource name. Please see https://aka.ms/arm-syntax-resources for usage details.'.", "additionalInfo": [{"type": "TemplateViolation", "info": {"lineNumber": 82, "linePosition": 67, "path": "properties.template.resources.defaultDataflowEndpoint.type"}}]}
@bdlb77 bdlb77 linked a pull request Apr 29, 2025 that will close this issue
@dominicbetts
Copy link
Member

Hi @bdlb77,

I just tested it in a clean environment and the existing .bicep file is working as expected:

azureuser@myVM:~$ wget https://raw.githubusercontent.com/Azure-Samples/explore-iot-operations/main/samples/quickstarts/quickstart.bicep -O quickstart.bicep
--2025-04-30 10:25:54--  https://raw.githubusercontent.com/Azure-Samples/explore-iot-operations/main/samples/quickstarts/quickstart.bicep
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.111.133, 185.199.110.133, 185.199.108.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8345 (8.1K) [text/plain]
Saving to: ‘quickstart.bicep’

quickstart.bicep               100%[====================================================>]   8.15K  --.-KB/s    in 0s      

2025-04-30 10:25:54 (60.6 MB/s) - ‘quickstart.bicep’ saved [8345/8345]

azureuser@myVM:~$ AIO_EXTENSION_NAME=$(az k8s-extension list -g $RESOURCE_GROUP --cluster-name $CLUSTER_NAME --cluster-type connectedClusters --query "[?extensionType == 'microsoft.iotoperations'].id" -o tsv | awk -F'/' '{print $NF}')
AIO_INSTANCE_NAME=$(az iot ops list -g $RESOURCE_GROUP --query "[0].name" -o tsv)
CUSTOM_LOCATION_NAME=$(az iot ops list -g $RESOURCE_GROUP --query "[0].extendedLocation.name" -o tsv | awk -F'/' '{print $NF}')
azureuser@myVM:~$ echo $AIO_EXTENSION_NAME
azure-iot-operations-...
azureuser@myVM:~$ echo $AIO_INSTANCE_NAME
myaiocluster-instance
azureuser@myVM:~$ echo $CUSTOM_LOCATION_NAME
location-...
azureuser@myVM:~$ az deployment group create --subscription $SUBSCRIPTION_ID --resource-group $RESOURCE_GROUP --template-file quickstart.bicep --parameters clusterName=$CLUSTER_NAME customLocationName=$CUSTOM_LOCATION_NAME aioExtensionName=$AIO_EXTENSION_NAME aioInstanceName=$AIO_INSTANCE_NAME
The configuration value of bicep.use_binary_from_path has been set to 'false'.
{
  ...
}

A couple of comments:

  • I notice in the sample output that you provided that the deployment appears to start before the download is complete. That doesn't look correct.
  • We were deploying a new version of Azure IoT Operations over the last few days - that deployment completed yesterday. Maybe you happened to try it at a crucial point in our update?

Can you retest with the original .bicep file to check if it's still not working for you? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants