Replies: 2 comments 2 replies
-
Your container environment and your containers are most likely on different life cycles. As in "apps are deployed multiple times a day, the environment not so much". The cleaner and probably easier solution is to split these tasks:
This also scales better when you have multiple containers and you get GitHub Actions to loop through all of them and deploy. |
Beta Was this translation helpful? Give feedback.
-
This issue is still valid and the use case is too. Let's say I have an infrastructure repo and pipeline, that creates my Azure stack. This problem could be solved if the container image could be a child resource of containerApp (e.g. Example usage could be: resource myContainerApps 'Microsoft.App/containerApps@2025-01-01' = {
name: 'ca-myapp'
location: location
properties: {
managedEnvironmentId: containerAppsEnvironment.id
configuration: {}
}
}
@onlyIfNotExists()
resource myContainerImage 'Microsoft.App/containerApps/containerImage@2025-01-01' = {
name: 'ca-myapp'
parent: myContainerApps
properties: {
containers: [
{
name: 'ca-myapp'
image: acrDefaultImage
resources: {
cpu: json('.25')
memory: '.5Gi'
}
}
]
}
} |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using Bicep to deploy an app into Azure Container Apps, the Container App is initialized with a dummy hello-world container.
Here is my code:
After the creation of the container app, the next versions are deployed using GitHub actions.
But the issue is that if I want to redeploy my bicep template, it will remove the last version of my app deployed via GitHub Actions, and put the hello-wolrd container instead, which breaks my app.
Is there a way, to tell bicep not to replace my container if it already exists ? Or maybe create a container without setting an image ?
Beta Was this translation helpful? Give feedback.
All reactions