When i try to create a function app using Azure playground, I am getting the following error.
{"code":"InvalidTemplateDeployment","details":[{"code":"RequestDisallowedByPolicy","target":"ASP-ODLazure819702-9b9c","message":"Resource 'ASP-ODLazure819702-9b9c' was disallowed by policy. (Code: RequestDisallowedByPolicy)","additionalInfo":[{"type":"PolicyViolation","info":{"evaluationDetails":{"evaluatedExpressions":[{"result":"False","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Web/serverfarms","targetValue":"Microsoft.Compute/virtualMachines","operator":"Like"},{"result":"False","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Web/serverfarms","targetValue":"Microsoft.Compute/sshPublicKeys","operator":"Like"},{"result":"False","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Web/serverfarms","targetValue":"Microsoft.Compute/virtualMachineScaleSets","operator":"Like"},{"result":"False","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Web/serverfarms","targetValue":"Microsoft.Compute/disks","operator":"Like"},{"result":"False","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Web/serverfarms","targetValue":"Microsoft.Storage","operator":"Like"},{"result":"False","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Web/serverfarms","targetValue":"Microsoft.Network/networkInterfaces","operator":"Like"},{"result":"False","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Web/serverfarms","targetValue":"Microsoft.Network/networkSecurityGroups","operator":"Like"},{"result":"False","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Web/serverfarms","targetValue":"Microsoft.Network/publicIPAddresses","operator":"Like"},{"result":"False","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Web/serverfarms","targetValue":"Microsoft.Network/virtualNetworks","operator":"Like"},{"result":"False","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Web/serverfarms","targetValue":"Microsoft.DocumentDB/databaseAccounts","operator":"Like"},{"result":"True","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Web/serverfarms","targetValue":"Microsoft.Web/serverfarms","operator":"Equals"},{"result":"False","expressionKind":"Field","expression":"Microsoft.Web/serverfarms/sku.name","path":"sku.name","expressionValue":"Y1","targetValue":["B1","WS1","F1","B2","B3","D1"],"operator":"In"},{"result":"False","expressionKind":"Field","expression":"Microsoft.Web/serverfarms/sku","path":"sku","expressionValue":"******","targetValue":["WorkflowStandard"],"operator":"In"}]},"policyDefinitionId":"/subscriptions/b2aec48f-6dad-4d57-ad25-dad521fe74a4/providers/Microsoft.Authorization/policyDefinitions/azure8922-819702-PolicyDefinition","policyDefinitionName":"azure8922-819702-PolicyDefinition","policyDefinitionDisplayName":"azure8922-819702-PolicyDefinition","policyDefinitionEffect":"deny","policyAssignmentId":"/subscriptions/b2aec48f-6dad-4d57-ad25-dad521fe74a4/resourceGroups/ODL-azure-819702/providers/Microsoft.Authorization/policyAssignments/azure8922-819702-PolicyDefinition-ODL-azure-819702","policyAssignmentName":"azure8922-819702-PolicyDefinition-ODL-azure-819702","policyAssignmentDisplayName":"azure8922-819702-PolicyDefinition-ODL-azure-819702","policyAssignmentScope":"/subscriptions/b2aec48f-6dad-4d57-ad25-dad521fe74a4/resourceGroups/ODL-azure-819702","policyAssignmentParameters":{}}}],"policyDetails":[{"isInitiative":false,"assignmentId":"/subscriptions/b2aec48f-6dad-4d57-ad25-dad521fe74a4/resourceGroups/ODL-azure-819702/providers/Microsoft.Authorization/policyAssignments/azure8922-819702-PolicyDefinition-ODL-azure-819702","assignmentName":"azure8922-819702-PolicyDefinition-ODL-azure-819702","nonComplianceMessage":null,"viewDetailsUri":"https://portal.azure.com#blade/Microsoft_Azure_Policy/EditAssignmentBladeV2/assignmentId/%2Fsubscriptions%2Fb2aec48f-6dad-4d57-ad25-dad521fe74a4%2FresourceGroups%2FODL-azure-819702%2Fproviders%2FMicrosoft.Authorization%2FpolicyAssignments%2Fazure8922-819702-PolicyDefinition-ODL-azure-819702"}]}],"message":"The template deployment failed because of policy violation. Please see details for more information."}
I tried to create a Node js(16 LTS) runtime stack and I choose the plan as ‘Consumption(Serverless)’.