ARM template variable copy block highlighting error
See original GitHub issueThere 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:
- Created 6 years ago
- Reactions:7
- Comments:13 (7 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Still on the list, hoping a month or two.
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.