Values in ISO8601 Duration format are failed to get parsed into TimeSpan

Andrey Semenov 20 Reputation points Microsoft Employee
2025-10-21T19:46:17.0366667+00:00

Hello

I've followed the documentation on Microsoft.ServiceFabric/clusters/applications resource to the letter and have defined the "upgradePolicy" section for the application in Bicep/ARMTemplate. The doc states that the timeout values are accepted in ISO8601 Duration format. Though, the deployment backend fails to parse the syntactically correct ISO8601 Duration values: Error converting value "PT5M" to type 'System.TimeSpan'. Path 'properties.upgradePolicy.rollingUpgradeMonitoringPolicy.healthCheckRetryTimeout', line 1, position 1823.

Azure Service Fabric
Azure Service Fabric
An Azure service that is used to develop microservices and orchestrate containers on Windows and Linux.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Jilakara Hemalatha 3,115 Reputation points Microsoft External Staff Moderator
    2025-10-21T21:07:16.79+00:00

    Hi Andrey Semenov

    Thanks for reaching Q/A and sharing your details. As per details you shared this happens because the system can't convert the ISO8601 format into a Timespan type, which is what Azure Service Fabric expects.

    Even though PT5M is a valid ISO8601 duration, it seems that Azure Service Fabric isn’t able to handle it correctly. So, we need to use a different format that Azure can understand.

    1. Double-check that you're using the correct format for the timeout value. For example, instead of PT5M you should use 00:05:00 (which is a TimeSpan format).
    2. Go back to your Bicep or ARM template and make sure you're setting the right field for the upgrade policy. For example, check that rollingUpgradeMonitoringPolicy.healthCheckRetryTimeout is the correct property to set for this timeout value.

    Reference: https://free.blessedness.top/en-us/azure/service-fabric/service-fabric-application-upgrade-parameters


0 additional answers

Sort by: Most helpful

Your answer

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