Use automatic deployments while preserving device or module specific settings

Kim Streich 0 Reputation points
2025-03-21T01:58:38.54+00:00

Hi,

I am trying to figure out the best way to use automatic deployments with Azure IoT Edge.

The automatic deployments work great. I can target all my devices, but for each device I need to set some device-specific settings.

For example, I am using the local blob storage module with the cloud upload function. I need to set a different connection string for each device to make sure devices can't read each other's uploads.

I created a deployment with some default settings that targets all devices. Then I created another module twin deployment that overrides the connection string and upload bucket that targets a single device and module.

This is working as I want it, but it means I will need to create one config deployment per device.

But according to this document there is a limit of 100 configurations per basic or standard SKU hub for Automatic device and module configurations.

This means I won't be able to configure more than 99 devices with this approach.

How can I solve this?

Is there another way for me to set device-specific settings and ensure they don't get overwritten by the automatic deployments?

Thanks, Kim

Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
{count} votes

1 answer

Sort by: Most helpful
  1. Sander van de Velde | MVP 36,941 Reputation points MVP Volunteer Moderator
    2025-03-21T13:37:08.8533333+00:00

    Hello @Kim Streich ,

    welcome to this moderated Azure community forum.

    We achieved this using the specific module twin configuration like:

    "properties": {
      "desired": {
        "url": 'http://realurl.com',
        "SendInterval": 5,
        "layeredProperties": {
          "url": 'http://dummy.com',
          "SendInterval": 60,
        }
      }
    }
    
    

    So the 'layeredProperties' are deployed via the layered deployments. If a module needs customization, we add the same property next to it.

    In the code of the module that handles twin changes, we test for both properties where the layered-properties are overruled by non-layered properties.

    So, the layered deployments only deploy generic values which can be overruled by custom properties.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.