createuidefinition output parameter part not working as expected If condition are not getting evaluated

Ankur Jain 21 Reputation points
2023-11-03T10:56:10.67+00:00

Hi Team,

I am stuck in publishing, and tried this but on portal and sandbox no error it just say below paramter is missing value in template that means UI is not passing parameter value to template when i used IF but without this working fine.

"fipStartAddress": "[if(contains(steps('Networking').DeploymentType,'dedicated'),'192.168.0.1','192.168.1.1')]"

and

"virtualNetworkName": "[if(contains(steps('Networking').DeploymentType,'asaservice'),'(steps('Networking').virtualNetwork2.name)','(steps('Networking').virtualNetwork.name)')]"

Could some one please help to identify if there is any issue in above I am coding or known issue ??

Thanks

Ankur Jain

Azure Managed Applications
Azure Managed Applications
An Azure service that enables managed service providers, independent software vendors, and enterprise IT teams to deliver turnkey solutions through the Azure Marketplace or service catalog.
124 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ryan Hill 27,026 Reputation points Microsoft Employee
    2023-11-25T17:28:39.6466667+00:00

    Hi @Ankur Jain

    Based off the information you provided, I would suggest setting the actual value property as follows:

    "outputs": {
        "fipStartAddress": {
            "type": "string",
            "value": "[if(equals(steps('Networking').DeploymentType, 'dedicated'), '192.168.0.1', '192.168.1.1')]"
        }
    }
    

    The value may be implied in the portal and sandbox but not during publishing. If you still getting the error message, please share more of your createUiDefinition.json so we can gain a better understanding of what you're doing.

    0 comments No comments