6 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.EntraId.Tests (1)
EntraIdProvisioningTests.cs (1)
288web.WithAnnotation(new AppIdentityAnnotation(identity.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))
46 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)
47if (Resource.TryGetLastAnnotation<AppIdentityAnnotation>(out var appIdentityAnnotation))
ContainerAppJobContext.cs (2)
38if (Resource.TryGetLastAnnotation<AppIdentityAnnotation>(out var appIdentityAnnotation))
Aspire.Hosting.Azure.AppService (2)
AzureAppServiceWebsiteContext.cs (2)
624if (resource.TryGetLastAnnotation<AppIdentityAnnotation>(out var appIdentityAnnotation))
Aspire.Hosting.Azure.EntraId (2)
EntraIdApplicationResource.cs (2)
1108=> consumer.TryGetLastAnnotation<AppIdentityAnnotation>(out var annotation)
Aspire.Hosting.Azure.Kubernetes (3)
AzureKubernetesEnvironmentExtensions.cs (1)
655/// Workload identity is automatically wired when compute resources have an <see cref="AppIdentityAnnotation"/>,
AzureKubernetesEnvironmentResource.AksPipeline.cs (2)
78if (r.TryGetLastAnnotation<AppIdentityAnnotation>(out var appIdentity))
Aspire.Hosting.Azure.Kubernetes.Tests (2)
AzureKubernetesEnvironmentExtensionsTests.cs (2)
432Assert.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 (14)
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)
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))