How to replace or update existing Container App deployment revision using CLI? #10671
-
I am migrating from Terraform to Bicep using Azure Container Apps. For quick development testing, I have been deploying Bicep files using the Azure CLI. For example:
I cannot seem to find any documentation on the best way to update or replace an existing deployment (or in this case, revision). If I make a change to some env variable in a container, since there is no 'replace/update/overwrite' command, I issue the same above command again. Then I get this error about revision already existing:
Revision mode is set to "Single" as I don't need multiple revisions. My workaround is to delete the container app completely (either from Azure CLI or the portal), wait for it to delete, and then redeploy again which takes about 10 minutes total each time. Is there an easier way to do this? I have been very stuck on this as in Azure Kubernetes Service there is no such thing as revisions since I always just use Helm charts, it updates the existing deployment with each change. If I use the Azure portal to "Edit the deployment" for my container, I can make changes, then I'm forced to type in a revision suffix name manually and then deploy that revision. If I then go back and try to use Here is an example of my bicep template (this is just a snippet):
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
hi @alicyn please review the each time you deploy you will need a new revision. Configuration
configuration: {
activeRevisionsMode: 'multiple' |
Beta Was this translation helpful? Give feedback.
oh great, I was going to mention the api version. there is a new workloadprofiles feature that is worth looking at.
You need to ensure each time you deploy that you get a new suffix value.