diff --git a/src/containerapp/HISTORY.rst b/src/containerapp/HISTORY.rst index 0cc57231005..b926b479f51 100644 --- a/src/containerapp/HISTORY.rst +++ b/src/containerapp/HISTORY.rst @@ -8,9 +8,9 @@ Release History * Added parameter --environment to 'az containerapp list' * Added 'az containerapp revision label swap' to swap traffic labels * BREAKING CHANGE: 'az containerapp revision list' now shows only active revisions by default, added flag --all to show all revisions +* Fixed but with 'az containerapp up' where custom domains would be removed when updating existing containerapp * Fixed bug with 'az containerapp auth update' when using --unauthenticated-client-action - 0.3.5 ++++++ * Add parameter --zone-redundant to 'az containerapp env create' diff --git a/src/containerapp/azext_containerapp/custom.py b/src/containerapp/azext_containerapp/custom.py index 86aaebba9f5..9f638f3238a 100644 --- a/src/containerapp/azext_containerapp/custom.py +++ b/src/containerapp/azext_containerapp/custom.py @@ -2344,7 +2344,10 @@ def containerapp_up_logic(cmd, resource_group_name, name, managed_env, image, en ingress_def = None if target_port is not None and ingress is not None: - ingress_def = IngressModel + if ca_exists: + ingress_def = containerapp_def["properties"]["configuration"]["ingress"] + else: + ingress_def = IngressModel ingress_def["external"] = external_ingress ingress_def["targetPort"] = target_port containerapp_def["properties"]["configuration"]["ingress"] = ingress_def