fortinet/fortigate-autoscale-azure

template error when accessing to secureObject of template outputs

JaydenLiang opened this issue · 1 comments

deployment failure:
{ "status": "Failed", "error": { "code": "InvalidTemplate", "message": "Unable to process template language expressions for resource '/subscriptions/4f27b38c-ad3f-43d8-a9a3-01182e5e2f9a/resourceGroups/fshuva-fazint-1/providers/Microsoft.Resources/deployments/SetupFunctionApp' at line '1908' and column '9'. 'The language expression property 'value' doesn't exist, available properties are 'type'.'", "additionalInfo": [ { "type": "TemplateViolation", "info": { "lineNumber": 1908, "linePosition": 9, "path": "" } } ] } }

root cause identified after investigation:
None of the output types 'secureString' and 'secureObject' is accessible because the output properties of these kinds are empty object. Therefore, for example, outputs.<name>.value doesn't exist on the <name> property.

this is an unexpected behavior of the ARM template output, which doesn't make sense when it seems to allow for passing data securely within linked templates. However, the value of such secure outputs are literally omitted and inaccessible. This isn't a good point for offering 'secure' output.

The same issue can be found on this topic: https://stackoverflow.com/questions/54435900/how-to-use-secureobject-or-securestring-returned-from-a-linked-arm-template

Resolution: use another linked template to use the data instead of passing them explicitly via template outputs.

resolved.