Search code examples
azureazure-resource-managerazure-rm-templateiso8601

Convert datetime string to unix timestamp in ARM template


Azure Resource Manager templates have functions for creating and converting ISO 8601 formatted timestamps. Unfortunately, Key Vault secret expiration attribute requires seconds since Unix epoch. How can I generate an arbitrary date time as seconds since Unix epoch in an ARM template?


Solution

  • i dont think you can (at least there is no shortcut for that), easier to generate this outside of the template and pass it to the template as a parameter