Skip to content

Comments

fix Identity property for Web container app so can need Web Identity …#16

Open
Be3751 wants to merge 1 commit intoAzure-Samples:mainfrom
Be3751:fix/clarify-need-to-use-webid-for-webcontainerapp
Open

fix Identity property for Web container app so can need Web Identity …#16
Be3751 wants to merge 1 commit intoAzure-Samples:mainfrom
Be3751:fix/clarify-need-to-use-webid-for-webcontainerapp

Conversation

@Be3751
Copy link

@Be3751 Be3751 commented Feb 23, 2025

Purpose

  • Modified the identityName property of the Web container app.
  • Ensures that the user-assigned managed identity for the Web container app is created before the Web container app itself is provisioned in Bicep.
  • Eliminates the need to run azd up twice to complete the provisioning process.

Does this introduce a breaking change?

[ ] Yes
[x] No

Pull Request Type

What kind of change does this Pull Request introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no API changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Get the code:
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Deploy the infrastructure:
azd up

What to Check

Verify that the following are valid:

  • The first execution of azd up completes successfully without errors.
  • The Web container app is provisioned without requiring a second azd up execution.
  • The user-assigned managed identity for the Web container app exists before the Web container app is provisioned.

Other Information

Background:

  • Previously, the Bicep configuration resulted in a failure during the first azd up execution.
  • The failure was caused by the Web container app being provisioned before its user-assigned managed identity was fully available.
  • The error message indicated that the resource was not found:
    ERROR: error executing step command 'provision': deployment failed: error deploying infrastructure: deploying to subscription:
    Deployment Error Details:
    NotFound: Resource '/subscriptions/.../resourcegroups/rg-dapralbums/providers/Microsoft.ManagedIdentity/userAssignedIdentities/id-web-ywilosqas33yy' was not found.
    
  • The managed identity was successfully created, but it was likely not fully provisioned when the Web container app deployment started.
  • Running azd up a second time succeeded since the managed identity was already present.

Verification:

  • After applying this change, azd up now succeeds on the first attempt.
  • No need to run azd up twice anymore.

@Be3751
Copy link
Author

Be3751 commented Apr 20, 2025

hi, @paulyuk. Could you review this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant