question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ARM template variable copy block highlighting error

See original GitHub issue

There is a syntax highlighting error in the azurerm-vscode-tools extension when editing ARM templates. In the following block in the variables section, the opening “copy”: block is underlined green indicating that it is never used and all references to the name “generatedSecurityRules” are underlined red indicating that it is not defined. The template actually executes fine when run against the Azure API.

"copy": [
            {
                "name": "generatedSecurityRules",
                "count": "[length(parameters('appServiceRules'))]",
                "input": {
                    "name": "[parameters('appServiceRules')[copyindex('generatedSecurityRules')].name]",
                    "properties": {
                        "description": "[parameters('appServiceRules')[copyindex('generatedSecurityRules')].description]",
                        "protocol": "[parameters('appServiceRules')[copyindex('generatedSecurityRules')].protocol]",
                        "sourcePortRange": "[parameters('appServiceRules')[copyindex('generatedSecurityRules')].sourcePortRange]",
                        "destinationPortRange": "[parameters('appServiceRules')[copyindex('generatedSecurityRules')].destinationPortRange]",
                        "destinationPortRanges": "[parameters('appServiceRules')[copyindex('generatedSecurityRules')].destinationPortRanges]",
                        "sourceAddressPrefixes": "[parameters('appServiceRules')[copyindex('generatedSecurityRules')].sourceAddressPrefixes]",
                        "destinationAddressPrefixes": "[parameters('appServiceRules')[copyindex('generatedSecurityRules')].destinationAddressPrefixes]",
                        "access": "[parameters('appServiceRules')[copyindex('generatedSecurityRules')].access]",
                        "priority": "[parameters('appServiceRules')[copyindex('generatedSecurityRules')].priority]",
                        "direction": "[parameters('appServiceRules')[copyindex('generatedSecurityRules')].direction]"
                    }
                }
            }
        ],
        "securityRuleList": "[concat(variables('generatedSecurityRules'), parameters('denyInternetRule'))]"

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:7
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
StephenWeatherfordcommented, Mar 18, 2019

Still on the list, hoping a month or two.

1reaction
StephenWeatherfordcommented, Jan 11, 2019

I’m hoping to get to it in a month or two, but we’ve got a lot going on, so I can’t promise it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Template structure and syntax - Azure Resource Manager
You are limited to 256 variables in a template. The following example shows the available options for defining a variable: JSON Copy.
Read more >
Can I have an ARM template resource with a COPY array of 0 ...
The easiest way to work around that is using this: { "condition": "[if(equals(parameters('numberOfDataDisks'), 0), bool('false'), ...
Read more >
List of the armcc error and warning messages - Arm Developer
The ARM Compiler Errors and Warnings Reference Guide provides lists of the errors and warnings that each of the compilation tools can generate....
Read more >
Template Variables - Datadog Docs
Hover over the template variable fields to see at a quick glance, the widgets that use that variable highlighted on the dashboard.
Read more >
Unable to connect to Azure storage for linked ARM templates
Using Azure Pipelines, I am trying to copy a set of linked templates from GitLab to a ... This works and returns variables...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found