Azure / Azure/azure-quickstart-templates

Log Analytics workspace with solutions and data sources - solutions array is not working

Open
#12,953 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Bicep
Stars
14.9k
Forks
16.2k
Avg merge
6d 21h
Merged PRs (30d)
6

Description

[Log Analytics workspace with solutions and data sources](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.logic/logic-app-create)

### Issue Details
The template has an array parameter for the solutions, but AzureRM seems to be unable to extract the properties (name, product, publisher etc) from just the solution name. I can't see how this is supposed to work with just an array.

The error from AzureRM is as follows:
`{"code": "InvalidTemplate", "target": "/subscriptions/redacted/resourceGroups/redacted/providers/Microsoft.Resources/deployments/loganalytics", "message": "Deployment template validation failed: 'The template resource '[format('{0}({1})', parameters('solutions')[copyIndex()].name, parameters('name'))]' at line '1' and column '2975' is not valid: The language expression property 'name' can't be evaluated.. Please see https://aka.ms/arm-template-expressions for usage details.'.", "additionalInfo": [{"type": "TemplateViolation", "info": {"lineNumber": 1, "linePosition": 2975, "path": "properties.template.resources[1]"}}]}`

### Repro steps
1. Deploy the template with any kind of oms solution name specified in the array

Contributor guide

No contributing guide indexed for this repository

Research direction

Inspect the linked quickstart at quickstarts/microsoft.logic/logic-app-create, focusing on the solutions parameter and the Log Analytics deployment resource. Reproduce the deployment with an OMS solution name and trace the reported solutions[copyIndex()].name evaluation error. Done means the template deploys successfully when a solution name is supplied in the array.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.