Hi @Alexander Broska | statworx Greetings! Welcome to Microsoft Q&A forum. Thank you for posting this question here. Inspecting the error message you have posted, it looks like the deployment of Arm template is failing because of this error "message": "Storage endpoints 'enpoint1' and 'endpoint2' have the same container.
I have tested the ARM template deployment by creating a Duplicate end point with the same Azure storage container and the deployment succeeded without any issues.
Please refer the below image from my ARM template which shows the storageContainers
section pointing to the same container. I have tried to add a new Custom End point TestDup3Container
through the ARM template.
I have added the following in the routes
section to create a route and link the TestDup3Container
custom end point.
After I deployed the file using the command az deployment group create --name RajIoTHub-template --resource-group <ResourceGroupName> --template-file "file-path\template.json"
I could see the new route getting created and receiving updates. Refer the below image
Please refer to the resource Add a new endpoint to your Resource Manager template that will help you guide through the steps needed to add a custom end point. Please also note that, if you already have created routes to IoT Hub portal, you can extract the ARM template by utilizing Automation section and Export template option on your IoT Hub. This will avoid any unexpected formatting issues within the template.
If you still face the issue, I appreciate it if you can share the deployment template file for further investigation by redacting any sensitive information such as connection strings and subscription IDs.