7 instantiations of AppIdentityAnnotation
Aspire.Hosting.Azure (2)
AzureResourcePreparer.cs (1)
370resource.Annotations.Add(new AppIdentityAnnotation(identityResource));
AzureUserAssignedIdentityExtensions.cs (1)
72builder.WithAnnotation(new AppIdentityAnnotation(identityResourceBuilder.Resource));
Aspire.Hosting.Azure.ApiManagement (1)
AzureApiManagementExtensions.cs (1)
153builder.WithAnnotation(new AppIdentityAnnotation(identityResourceBuilder.Resource), ResourceAnnotationMutationBehavior.Replace);
Aspire.Hosting.Azure.EntraId.Tests (1)
EntraIdProvisioningTests.cs (1)
518web.WithAnnotation(new AppIdentityAnnotation(identity.Resource));
Aspire.Hosting.Azure.Tests (3)
AzureSandboxesTests.cs (3)
300.WithAnnotation(new AppIdentityAnnotation(computeIdentity.Resource)) 322.WithAnnotation(new AppIdentityAnnotation(identity.Resource)) 348.WithAnnotation(new AppIdentityAnnotation(identity.Resource))
49 references to AppIdentityAnnotation
Aspire.Hosting.Azure (6)
AzureResourcePreparer.cs (5)
227if (resource.HasAnnotationOfType<AppIdentityAnnotation>()) 367if (!resource.TryGetLastAnnotation<AppIdentityAnnotation>(out var existingAppIdentityAnnotation) || 445else if (resource.TryGetLastAnnotation<AppIdentityAnnotation>(out var appIdentityAnnotation) &&
ManagedIdentityRequiredAnnotation.cs (1)
17/// <c>WithAzureUserAssignedIdentity</c>. The identity is available from the resource's <see cref="AppIdentityAnnotation"/>
Aspire.Hosting.Azure.AppContainers (4)
ContainerAppContext.cs (2)
46if (Resource.TryGetLastAnnotation<AppIdentityAnnotation>(out var appIdentityAnnotation))
ContainerAppJobContext.cs (2)
38if (Resource.TryGetLastAnnotation<AppIdentityAnnotation>(out var appIdentityAnnotation))
Aspire.Hosting.Azure.AppService (2)
AzureAppServiceWebsiteContext.cs (2)
635if (resource.TryGetLastAnnotation<AppIdentityAnnotation>(out var appIdentityAnnotation))
Aspire.Hosting.Azure.EntraId (4)
EntraIdApplicationResource.cs (4)
452?? (assignment.Target.TryGetLastAnnotation<AppIdentityAnnotation>(out var annotation) 1213=> consumer.TryGetLastAnnotation<AppIdentityAnnotation>(out var annotation)
Aspire.Hosting.Azure.Kubernetes (3)
AzureKubernetesEnvironmentExtensions.cs (1)
682/// Workload identity is automatically wired when compute resources have an <see cref="AppIdentityAnnotation"/>,
AzureKubernetesEnvironmentResource.AksPipeline.cs (2)
77if (r.TryGetLastAnnotation<AppIdentityAnnotation>(out var appIdentity))
Aspire.Hosting.Azure.Kubernetes.Tests (2)
AzureKubernetesEnvironmentExtensionsTests.cs (2)
435Assert.True(project.Resource.TryGetLastAnnotation<AppIdentityAnnotation>(out var appIdentity));
Aspire.Hosting.Azure.Sandboxes (6)
AzureSandboxContainerDeployment.cs (4)
773if (!resource.TryGetLastAnnotation<AppIdentityAnnotation>(out var appIdentityAnnotation) || 794if (!resource.TryGetLastAnnotation<AppIdentityAnnotation>(out var appIdentityAnnotation) ||
AzureSandboxGroupResource.cs (2)
229if (resource.TryGetLastAnnotation<AppIdentityAnnotation>(out var appIdentity))
Aspire.Hosting.Azure.Tests (15)
AzureApiManagementTests.cs (1)
2566Assert.Same(identity.Resource, apim.Resource.Annotations.OfType<AppIdentityAnnotation>().Single().IdentityResource);
AzureUserAssignedIdentityTests.cs (14)
114var annotation = Assert.Single(project.Resource.Annotations.OfType<AppIdentityAnnotation>()); 133var annotation = Assert.Single(project.Resource.Annotations.OfType<AppIdentityAnnotation>()); 175var identityAnnotation = Assert.Single(computeResource.Annotations.OfType<AppIdentityAnnotation>()); 222var identityAnnotation = Assert.Single(computeResource.Annotations.OfType<AppIdentityAnnotation>()); 280var identityAnnotation = Assert.Single(computeResource.Annotations.OfType<AppIdentityAnnotation>()); 361var identityAnnotation = Assert.Single(computeResource.Annotations.OfType<AppIdentityAnnotation>()); 363var identityAnnotation2 = Assert.Single(computeResource2.Annotations.OfType<AppIdentityAnnotation>());
Aspire.Hosting.Foundry (3)
Project\ProjectResource.cs (3)
275/// the <see cref="AppIdentityAnnotation"/>. This is the identity that will be 280if (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))