azure-dev icon indicating copy to clipboard operation
azure-dev copied to clipboard

Add support for custom User Assigned Identities against Aspire Projects

Open rudiv opened this issue 1 year ago • 1 comments

See https://github.com/dotnet/aspire/pull/3339 for more information.

This change adds support to azd to consume a new userAssignedIdentities property in the Aspire manifest.

An example being:

"userAssignedIdentities": [
  {
    "clientId": "00000000-0000-0000-0000-000000000000",
    "resourceId": "/subscriptions/\u003Csubscription_id\u003E/resourcegroups/my-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-user",
    "env": "TEST"
  },
  {
    "clientId": "{identities.outputs.clientId}",
    "resourceId": "{identities.outputs.resourceId}",
    "env": "TEST2"
  }
]

The change adds support for:

  1. Detection of template strings within this new property
  2. The generation of environment variables to support the Client IDs
  3. The addition of the userAssignedIdentities in the container's yaml

rudiv avatar Apr 02 '24 17:04 rudiv

Thank you for your contribution rudiv! We will review the pull request and get back to you soon.

I'm going to close this for now - based on the discussion in https://github.com/dotnet/aspire/pull/3339 we do want to support this scenario long term, but we don't think this is the right way to do it (and it likely is something we'll want to do post GA once we move the logic for created the IAC for Container Apps into the Aspire deployment package and outside of azd.

ellismg avatar Apr 22 '24 21:04 ellismg