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

Block nested deployment resources with inner scoped evaluation and symbolic references to outer scope #11884

Prev Previous commit
Next Next commit
Skip check on malformed resource declaration
  • Loading branch information
jeskew committed Sep 22, 2023
commit ee9112cf05ee6ae61994a68231aea2e5399fbc18
2 changes: 1 addition & 1 deletion src/Bicep.Core/Emit/EmitLimitationCalculator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ private static void BlockSymbolicReferencesInInnerScopedNestedDeployments(Semant
foreach (var resource in model.DeclaredResources.Where(r => r.IsAzResource))
{
if (!LanguageConstants.ResourceTypeComparer.Equals(resource.TypeReference.FormatType(), AzResourceTypeProvider.ResourceTypeDeployments) ||
resource.Symbol.DeclaringResource.GetBody().TryGetPropertyByName("properties", StringComparison.OrdinalIgnoreCase)?.Value is not ObjectSyntax propertiesObject ||
resource.Symbol.DeclaringResource.TryGetBody()?.TryGetPropertyByName("properties", StringComparison.OrdinalIgnoreCase)?.Value is not ObjectSyntax propertiesObject ||
propertiesObject.TryGetPropertyByName("template", StringComparison.OrdinalIgnoreCase)?.Value is not SyntaxBase nestedTemplate)
{
continue;
Expand Down
Loading