Azure / Azure/container-apps-deploy-action
Action deploys new ACA Env and Log Analytics Workspace when using separate Resource Groups
- Dominant language
- TypeScript
- Stars
- 94
- Forks
- 51
- Avg merge
- 4d 18h
- Merged PRs (30d)
- 1
Description
### Error Details
The action looks for ACA Env in the `resourceGroup` provided as the action's input instead of checking the `environmentId` from the YAML template, creating a new ACA Env and Log Analytics Workspace.
Additionally, the deployed Container App is assigned to the correct ACA Env (provided in the YAML template), but the action still deploys a new one (in pair with Log Analytics Workspace)
Logs related to the ACA Env and Log Analytics Workspace creation:
```bash
/usr/bin/az containerapp env list -g container-apps-01-rg --query [0].name
WARNING: The behavior of this command has been altered by the following extension: containerapp
Default Container App environment name: some-container-app-01-ca-env
/usr/bin/az containerapp env show -o none -g container-apps-01-rg -n some-container-app-01-ca-env
WARNING: The behavior of this command has been altered by the following extension: containerapp
ERROR: (ResourceNotFound) The Resource 'Microsoft.App/managedEnvironments/some-container-app-01-ca-env' under resource group 'container-apps-01-rg' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix
The process '/usr/bin/az' failed with exit code 1
/usr/bin/az containerapp env create -n some-container-app-01-ca-env -g container-apps-01-rg -l westus2
WARNING: The behavior of this command has been altered by the following extension: containerapp
WARNING: No Log Analytics workspace provided.
WARNING: Generating a Log Analytics workspace with name "workspace-containerapps01rgLoBh"
```
**Note:** Our Container Apps are located in a different Resource Group, than the ACA Environment
### Expected outcome
The action should respect the `environmentId` provided within the YAML template instead of checking if **any** managed environments exist in the provided `resourceGroup` input.
### Workaround
Downgrade the action to `v1`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the action's environment lookup and deployment flow, focusing on the YAML template's environmentId and the az containerapp env commands shown in the logs. Verify that lookup uses the template environment and its resource group, then confirm the action deploys the Container App without creating an extra ACA Environment or Log Analytics Workspace.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, github-actions, typescript
- Domain
- cloud, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100