Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Circular dependency detected in template language expression #13553

Open
jejass opened this issue Sep 9, 2023 · 0 comments
Open

Error: Circular dependency detected in template language expression #13553

jejass opened this issue Sep 9, 2023 · 0 comments

Comments

@jejass
Copy link

jejass commented Sep 9, 2023

[Template Name goes here](Template link goes here)

Issue Details

My template
`{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"recommendationSeverities": {
"type": "array",
"defaultValue": [ ]
}

},
"functions": [],
"variables": {
"recommendationSeveritiesLength": "[length(parameters('recommendationSeverities'))]",
"ruleSetsForAssessmentsObj": {
"copy": [
{
"name": "ruleSetsForAssessmentsArr",
"count": 1,
"input": {
"rules": [
{
"propertyJPath": "properties.metadata.severity",
"propertyType": "string",
"expectedValue": "[parameters('recommendationSeverities')[mod(div(copyIndex('ruleSetsForAssessmentsArr'),1),variables('recommendationSeveritiesLength'))]]",
"operator": "Equals"
}
]
}
}
]
},
"sourcesWithoutSubAssessments": {
"copy": [
{
"name": "sources",
"count": 1,
"input": {
"eventSource": "[variables('ruleSetsForAssessmentsObj').ruleSetsForAssessmentsArr]"
}
}
]
}
},
"resources": [
{
"name": "dfasdfdasfasde",
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2021-04-01",
"location": "eastus",
"kind": "StorageV2",
"sku": {
"name": "Premium_LRS",
"tier": "Premium"
}
}
],
"outputs": {}
}`

Repro steps (if necessary, delete otherwise)

  1. deploy the template.
  2. it will report error of 'circular dependency' while there is no circular dependency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant