In Azure Device Provisioning Service
- when using a custom allocation policy,
- with '--reprovision-policy reprovisionandmigratedata'
is it possible to migrate the device twin data when the changing hubs and change some of the values in the twin?
From experiments initialTwin
is ignored when moving between hubs (as opposed to registered for the first time) which is not that unexpected.
Example
Let's say that device d1 is provisioned to hub1 and its desired is
"desired" : {
"a": 1
}
Some time later d1 reprovisions and the allocation function is executed and it will move the device to hub2. I need the new desired to be:
"desired" : {
"a": 2
}