Closed shankarvrp closed 1 week ago
Thank you for your feedback. Tagging and routing to the team member best able to assist.
Please following this document to understand the limitations and prerequisites. https://learn.microsoft.com/en-us/azure/container-instances/using-azure-container-registry-mi As the doc suggest, we could assgin the identity both in identity property and imageRegistryCredentials property part, which would make the code look like:
var containerGroup = new ContainerGroupData(
location: "westus",
containers: containers,
osType: ContainerInstanceOperatingSystemType.Linux)
{
Identity = new ManagedServiceIdentity(ManagedServiceIdentityType.UserAssigned)
{
UserAssignedIdentities =
{
{ new ResourceIdentifier("uid"), new UserAssignedIdentity() }
}
},
ImageRegistryCredentials =
{
new ContainerGroupImageRegistryCredential("myacr.azurecr.io")
{
Identity = "uid"
}
},
.... }
Hi @shankarvrp. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.
Hi @shankarvrp, since you haven’t asked that we /unresolve
the issue, we’ll close this out. If you believe further discussion is needed, please add a comment /unresolve
to reopen the issue.
Library name and version
Azure.ResourceManager.ContainerInstance 1.2.1
Query/Question
Hi All,
I am using the samples to create ACI, while all samples appear to cover the public images to use in ACR, I don't see a way to connect to ACR using Managed Identity. Is there a way to achieve this when creating ACI instance programmatically today or is coming in the near term? Thanks much
On another note, also tried using Microsoft.Azure.Management.ContainerInstance.Fluent, there is the WithPrivateImageRegistry option that takes username and password but that also doesn't support managed identity.
Environment
No response