We see the value in the feature; however there is no easy way to do this at the moment.
An error occurred while saving the commentniemilkm commented
+1 on this feature request. I submitted this also on Github https://github.com/Azure/iotedgedev/issues/464 . To summarize this ticket states:
I understand how to add tags to an edge device in IoT Hub and then how to do a deployment and use those tags to select some subset of my edge devices.
The IoT Module that I am deploying has an environment variable called ACCESS_KEY. I get this ACCESS_KEY from a 3rd party service and each module that is deployed has to have a unique ACCESS_KEY. If I deploy these modules 1 at a time, this is easy to do because I add the module to my device, click on the module, go to environment variables, and type in that unique ACCESS_KEY.
If I want to do this at scale, I need a way in the deployment to pass a unique ACCESS_KEY to the module that is going to be deployed for each gateway. Let's say in my deployment I state tags.location.floor = '1' and that pulls in two devices for this module to be pushed down. Each module has to have a unique ACCESS_KEY environment variable value. If it uses the same ACCESS_KEY for both devices then it won't work.
My suggestion on a way to get around this, and again I am open to better ways, is to allow me to specify on my Edge Device in IoT Hub a tag that can then be dynamically referenced in the module on deployment. For example, I would create a device tag like so, tags.access_key and each Edge Device in IoT Hub would have a unique value there. Then in the deployment when I select my IoT Module, and then I click to configure it, and go to Environment Variables, I could then enter something like %%tags.access_key%% for the environment variable of ACCESS_KEY and on deployment to each device, it would fill in the correct value of the access key for each module from the IoT Edge tag access key.niemilkm supported this idea ·