parameters.json curly brace handling not working
See original GitHub issueDescribe the Bug
The following in a parameters.json
snippet works on Azure, but doesn’t work locally, with error: The provided subscription identifier '@appsetting('WORKFLOWS_SUBSCRIPTION_ID')' is malformed or invalid.
"arm_authentication": {
"type": "object",
"value": {
"api": {
"id": "/subscriptions/@appsetting('WORKFLOWS_SUBSCRIPTION_ID')/providers/Microsoft.Web/locations/westeurope/managedApis/arm"
},
"connection": {
"id": "/subscriptions/@appsetting('WORKFLOWS_SUBSCRIPTION_ID')/resourceGroups/@appsetting('WORKFLOWS_RESOURCE_GROUP_NAME')/providers/Microsoft.Web/connections/connection_arm"
},
"connectionRuntimeUrl": "@appsetting('CONNECTOR_ARM_RUNTIMEURL')",
"authentication": {
"type": "Raw",
"scheme": "Key",
"parameter": "@appsetting('arm-connectionKey')"
}
}
},
The following in a parameters.json
snippet works locally but doesn’t work on Azure. it creates a gateway timeout error going to the invoked workflow which uses this connection (i’m invoking a workflow from my main workflow, the one i’m invoking gives a timeout).
"arm_authentication": {
"type": "object",
"value": {
"api": {
"id": "/subscriptions/@{appsetting('WORKFLOWS_SUBSCRIPTION_ID')}/providers/Microsoft.Web/locations/westeurope/managedApis/arm"
},
"connection": {
"id": "/subscriptions/@{appsetting('WORKFLOWS_SUBSCRIPTION_ID')}/resourceGroups/@{appsetting('WORKFLOWS_RESOURCE_GROUP_NAME')}/providers/Microsoft.Web/connections/connection_arm"
},
"connectionProperties": {
"authentication": {
"audience": "https://management.core.windows.net/",
NOT RELEVANT FOR SAMPLE
}
},
"connectionRuntimeUrl": "@appsetting('CONNECTOR_ARM_RUNTIMEURL')",
"authentication": {
NOT RELEVANT FOR SAMPLE
}
}
},
my connections.json:
{
"managedApiConnections": {
"azuresentinel": "@parameters('azuresentinel_authentication')",
"service-now": "@parameters('servicenow_authentication')",
"office365": "@parameters('office365_authentication')",
"arm": "@parameters('arm_authentication')"
}
}
So situation is:
- ONLY works locally: connections.json --> pointing to parameters.json where in this file it’s using is curly brackets to point to appsettings
- ONLY works in azure: connections.json --> pointing to parameters.json where in this file it’s NOT using curly brackets to point to appsettings
I would understand if situation 2 is not supported but situation 1 should get supported i guess…
Related to https://github.com/Azure/logicapps/issues/527, it’s about connections.json but it should be fixed for parameters.json in this situation too…
Plan Type
Standard
Steps to Reproduce the Bug or Issue
Setup the linked files like explained above and test.
I’m running in the latest runtime (v4) and using the latest v1.0.45
extension (just released).
Workflow JSON
No response
Screenshots or Videos
No response
Additional context
No response
AB#16780108
Issue Analytics
- State:
- Created 8 months ago
- Comments:10 (2 by maintainers)
@ccastrotrejo can you take a look at the first issue above where parameterizing the whole connection object is causing designer to not load in VSCode.
@erwinkramer for the las tissue you mentioned where the appsetting is not being resolved for identity, we are tracking that issue and we have a fix almost ready for it but no ETA yet on when it will be deployed out. I can update you when we have that.
Hi @erwinkramer thanks for raising this issue. Parameterization resolver isn’t picking the connection data when storing the whole object in
parameters.json
, the immediate work-around I can suggest is to keep the connection data object inconnections.json
. I will work on solving this issue and make it work it back again.