Hi @Sander van de Velde | MVP thanks for your reply!
Azure IoT Edge Modules are not aware of the way the Edge device is connected to the IoT Hub. These can deployed on any device running the Azure IoT Edge runtime. They only care about connection the EdgeHub module.
The security between Azure IoT Edge runtime and IoT Hub (even when using the DPS) connection, is controlled by the IoT Edge runtime itself.
Ok, it makes sense. Let me explain a bit more, if required I'll create a new thread.
I started testing the IoTHubModuleClient.create_from_x509_certificate method because we actually use the create_from_edge_environment method and faced some issues. With the "from_edge_environment" method we had no problems connecting to our IoT Hub within the module but after 30 days or so have passed we have to remotely restart (or power-off) our devices in order to regain a "new self-signed certificate" (I'm not entirely sure about this, but I can assure you that if we don't restart our device then the module's cannot connect to the IoT Hub)
From Azure's module troubleshouting logs:
And if we run the iotedge runtime's check option (iotedge check).
The samples you refer to are for logic running on 'direct internet connected devices', not edge devices.
Ok, this clarifies a lot!
I see in your attached snapshot the create_from_edge_environment method. Is this method supposed to be used for instancing a new IoTHubModule client? (instead of the create_from_x509)
Once again, thanks a lot for your aid! I'll be reading the articles you shared above and return if I still have issues.