sparse-intern-71089
04/13/2022, 4:25 PMable-train-72108
04/13/2022, 8:15 PMaz acr login -n <name of my registry>
and then run pulumi up and because I have push writes to the registry, the image is pushed to the registrydamp-honey-93158
04/14/2022, 7:59 AMable-train-72108
04/14/2022, 3:06 PMaz ad sp
which is used in my CI pipeline.able-train-72108
04/14/2022, 3:09 PM// Create an AD service principal
var adApp = new Application("aks", new ApplicationArgs
{
DisplayName = "aks"
});
this.AdApplication = adApp.ApplicationId;
var adSp = new ServicePrincipal("aksSp", new ServicePrincipalArgs
{
ApplicationId = adApp.ApplicationId
});
// Create the Service Principal Password
var adSpPassword = new ServicePrincipalPassword("aksSpPassword", new ServicePrincipalPasswordArgs
{
ServicePrincipalId = adSp.Id
});
this.AdPassword = adSpPassword.Value;
_ = new AzureNative.Authorization.RoleAssignment("roleAssignment", new AzureNative.Authorization.RoleAssignmentArgs
{
PrincipalId = adSp.Id,
PrincipalType = "ServicePrincipal",
RoleDefinitionId = "/providers/Microsoft.Authorization/roleDefinitions/8311e382-0749-4cb8-b61a-304f252e45ec",
Scope = "/subscriptions/<subscription id>/resourceGroups/<rg of the acr>/providers/Microsoft.ContainerRegistry/registries/<acr name>",
});