5 instantiations of AppIdentityAnnotation
Aspire.Hosting.Azure (2)
AzureResourcePreparer.cs (1)
327resource.Annotations.Add(new AppIdentityAnnotation(identityResource));
AzureUserAssignedIdentityExtensions.cs (1)
72builder.WithAnnotation(new AppIdentityAnnotation(identityResourceBuilder.Resource));
Aspire.Hosting.Azure.Tests (3)
AzureSandboxesTests.cs (3)
268.WithAnnotation(new AppIdentityAnnotation(computeIdentity.Resource)) 290.WithAnnotation(new AppIdentityAnnotation(identity.Resource)) 316.WithAnnotation(new AppIdentityAnnotation(identity.Resource))
39 references to AppIdentityAnnotation
Aspire.Hosting.Azure (5)
AzureResourcePreparer.cs (5)
184if (resource.HasAnnotationOfType<AppIdentityAnnotation>()) 324if (!resource.TryGetLastAnnotation<AppIdentityAnnotation>(out var existingAppIdentityAnnotation) || 402else if (resource.TryGetLastAnnotation<AppIdentityAnnotation>(out var appIdentityAnnotation) &&
Aspire.Hosting.Azure.AppContainers (4)
ContainerAppContext.cs (2)
44if (Resource.TryGetLastAnnotation<AppIdentityAnnotation>(out var appIdentityAnnotation))
ContainerAppJobContext.cs (2)
38if (Resource.TryGetLastAnnotation<AppIdentityAnnotation>(out var appIdentityAnnotation))
Aspire.Hosting.Azure.AppService (2)
AzureAppServiceWebsiteContext.cs (2)
583if (resource.TryGetLastAnnotation<AppIdentityAnnotation>(out var appIdentityAnnotation))
Aspire.Hosting.Azure.Kubernetes (3)
AzureKubernetesEnvironmentExtensions.cs (1)
495/// Workload identity is automatically wired when compute resources have an <see cref="AppIdentityAnnotation"/>,
AzureKubernetesEnvironmentResource.AksPipeline.cs (2)
83if (r.TryGetLastAnnotation<AppIdentityAnnotation>(out var appIdentity))
Aspire.Hosting.Azure.Kubernetes.Tests (2)
AzureKubernetesEnvironmentExtensionsTests.cs (2)
204Assert.True(project.Resource.TryGetLastAnnotation<AppIdentityAnnotation>(out var appIdentity));
Aspire.Hosting.Azure.Sandboxes (6)
AzureSandboxContainerDeployment.cs (4)
775if (!resource.TryGetLastAnnotation<AppIdentityAnnotation>(out var appIdentityAnnotation) || 796if (!resource.TryGetLastAnnotation<AppIdentityAnnotation>(out var appIdentityAnnotation) ||
AzureSandboxGroupResource.cs (2)
231if (resource.TryGetLastAnnotation<AppIdentityAnnotation>(out var appIdentity))
Aspire.Hosting.Azure.Tests (10)
AzureUserAssignedIdentityTests.cs (10)
126var identityAnnotation = Assert.Single(computeResource.Annotations.OfType<AppIdentityAnnotation>()); 173var identityAnnotation = Assert.Single(computeResource.Annotations.OfType<AppIdentityAnnotation>()); 231var identityAnnotation = Assert.Single(computeResource.Annotations.OfType<AppIdentityAnnotation>()); 312var identityAnnotation = Assert.Single(computeResource.Annotations.OfType<AppIdentityAnnotation>()); 314var identityAnnotation2 = Assert.Single(computeResource2.Annotations.OfType<AppIdentityAnnotation>());
Aspire.Hosting.Foundry (3)
Project\ProjectResource.cs (3)
273/// the <see cref="AppIdentityAnnotation"/>. This is the identity that will be 278if (this.TryGetLastAnnotation<AppIdentityAnnotation>(out var identityAnnotation))
AzureAppService.AppHost (2)
AppHost.cs (2)
41if (context.Resource.TryGetLastAnnotation<AppIdentityAnnotation>(out var identity))
AzureContainerApps.AppHost (2)
AppHost.cs (2)
50if (context.Resource.TryGetLastAnnotation<AppIdentityAnnotation>(out var identity))