azure-iot-central

InvalidResourceName error on learn/modules/connect-iot-edge-device-to-iot-central


I'm just running through this learning module and seem to be stuck on unit 5/8 (Exercise - Deploy an IoT Edge device and manage it from IoT Central)

https://learn.microsoft.com/en-us/learn/modules/connect-iot-edge-device-to-iot-central/

See screenshot below for the error I'm getting. I've followed the steps up to this point which have been fairly straight forward. Wondering if this is a bug? Can anyone shed any light on this? Thanks!

enter image description here


Solution

  • Most likely, the value of $APP_NAME is empty. That would result in a value of ip- for the dnsLabelPrefix parameter in the script. To verify this, try reading the value echo $APP_NAME.

    This variable was set in module 3 Exercise - Create an IoT Central application. It's likely that if you took a break and started a new sandbox, this value is no longer set. Try setting the value explicitly before running the step resulting in the error. Simply set the value to your IoT Central app name.

    APP_NAME="store-manager-$RANDOM"
    echo "Your application name is: $APP_NAME"