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

[BUG] listKeys function is not supported #291

Open
VeraBE opened this issue Sep 19, 2022 · 0 comments
Open

[BUG] listKeys function is not supported #291

VeraBE opened this issue Sep 19, 2022 · 0 comments
Labels
bug Something isn't working revisit No immediate plans to schedule the work due to resource constraints

Comments

@VeraBE
Copy link
Contributor

VeraBE commented Sep 19, 2022

Describe the bug

A user reported getting this warning in their output:

Warning: An exception occurred while evaluating the properties of a resource. Properties: "CacheConnection": "[concat(variables('cacheName'),'.redis.cache.windows.net,abortConnect=false,ssl=true,password=', listKeys(resourceId('Microsoft.Cache/Redis', variables('cacheName')), '2020-12-01').primaryKey)]"
Exception details:
Azure.Deployments.Core.Exceptions.ExpressionException: The language expression property 'primaryKey' can't be evaluated.
   at Azure.Deployments.Expression.Expressions.FunctionExpression.SelectProperty(JToken root, JToken property, TemplateErrorAdditionalInfo additionalInfo)
   at Azure.Deployments.Expression.Expressions.FunctionExpression.EvaluateExpression(ExpressionEvaluationContext context, TemplateErrorAdditionalInfo additionalInfo)
   at Azure.Deployments.Expression.Expressions.FunctionExpression.<>c__DisplayClass23_0.<EvaluateParameters>b__0(LanguageExpression parameter)       
   at System.Array.ConvertAll[TInput,TOutput](TInput[] array, Converter`2 converter)
   at Microsoft.WindowsAzure.ResourceStack.Common.Extensions.IEnumerableExtensions.SelectArray[TSource,TElement](TSource[] source, Converter`2 elementSelector)
   at Azure.Deployments.Expression.Expressions.FunctionExpression.EvaluateParameters(ExpressionEvaluationContext context, TemplateErrorAdditionalInfo additionalInfo)
   at Azure.Deployments.Expression.Expressions.FunctionExpression.EvaluateExpression(ExpressionEvaluationContext context, TemplateErrorAdditionalInfo additionalInfo)
   at Azure.Deployments.Expression.Engines.ExpressionsEngine.EvaluateLanguageExpressionsInternal(JToken root, ExpressionEvaluationContext evaluationContext, Boolean ignoreExceptions, TemplateErrorAdditionalInfo additionalInfo, InsensitiveHashSet skipEvaluationPaths)
   at Azure.Deployments.Expression.Engines.ExpressionsEngine.EvaluateLanguageExpressionsRecursive(JToken root, ExpressionEvaluationContext evaluationContext, TemplateErrorAdditionalInfo additionalInfo, InsensitiveHashSet skipEvaluationPaths)
   at Microsoft.Azure.Templates.Analyzer.TemplateProcessor.ArmTemplateProcessor.ProcessTemplateResourceLanguageExpressions(TemplateResource templateResource, TemplateExpressionEvaluationHelper evaluationHelper) in C:\Users\wilbug1\source\repos\template-analyzer\src\Analyzer.TemplateProcessor\ArmTemplateProcessor.cs:line 390

Expected behavior

Template properties that use the listKeys function should be processed

Reproduction Steps

Analyze a template that uses the listKeys function

Environment

No response

@VeraBE VeraBE added bug Something isn't working 🔍 needs-triage labels Sep 19, 2022
@JohnathonMohr JohnathonMohr added revisit No immediate plans to schedule the work due to resource constraints and removed 🔍 needs-triage labels Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working revisit No immediate plans to schedule the work due to resource constraints
Projects
None yet
Development

No branches or pull requests

2 participants