Skip to content

Commit

Permalink
Filter containers out of Azure Provisioner. (#6066)
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchdenny authored Oct 3, 2024
1 parent 6eb2670 commit 3f6737a
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,16 @@ IDistributedApplicationEventing eventing
var azureResources = new List<(IResource, IAzureResource)>();
foreach (var resource in appModel.Resources)
{
if (resource is IAzureResource azureResource)
if (resource.IsContainer())
{
continue;
}
else if (resource is IAzureResource azureResource)
{
// If we are dealing with an Azure resource then we just return it.
azureResources.Add((resource, azureResource));
}
if (resource.Annotations.OfType<AzureBicepResourceAnnotation>().SingleOrDefault() is { } annotation)
else if (resource.Annotations.OfType<AzureBicepResourceAnnotation>().SingleOrDefault() is { } annotation)
{
// If we aren't an Azure resource and there is no surrogate, return null for
// the Azure resource in the tuple (we'll filter it out later.
Expand Down

0 comments on commit 3f6737a

Please sign in to comment.