az containerapp env update --dns-suffix is silently ignored (dnsSuffix never sent in PATCH)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Read src/containerapp/azext_containerapp/containerapp_env_decorator.py, especially ContainerappEnvPreviewUpdateDecorator.set_up_custom_domain_configuration(), and compare it with the create decorator. Run the documented az containerapp env update command, inspect the PATCH body, and verify with az containerapp env show that customDomainConfiguration.dnsSuffix contains the supplied value.
Written by the indexing model from the issue text.
Description
Describe the bug
az containerapp env update --dns-suffix <suffix> --certificate-file <pfx> --certificate-password <pwd>
reports success (HTTP 200) but the custom DNS suffix is never applied. After the command,
az containerapp env show ... --query properties.customDomainConfiguration returns
dnsSuffix: null (and certificateValue/thumbprint also null).
Inspecting the outgoing PATCH request body shows customDomainConfiguration contains
certificateValue / certificatePassword / certificateKeyVaultProperties, but no dnsSuffix —
so the --dns-suffix value is silently dropped on update.
Root cause (source)
In src/containerapp/azext_containerapp/containerapp_env_decorator.py:
- The create decorator
ContainerappEnvPreviewCreateDecorator._set_up_custom_domain_configuration()
correctly setscustom_domain["dnsSuffix"] = self.get_argument_hostname(). - The update decorator
ContainerappEnvPreviewUpdateDecorator.set_up_custom_domain_configuration()
only does:
It never setssafe_set(self.managed_env_def, "properties", "customDomainConfiguration", "certificateValue", value=blob) safe_set(self.managed_env_def, "properties", "customDomainConfiguration", "certificatePassword", value=...) safe_set(self.managed_env_def, "properties", "customDomainConfiguration", "certificateKeyVaultProperties", value=None)dnsSuffixand never reads--dns-suffix(thehostnameargument). As a result
--dns-suffixis a no-op onenv update.
This is still present on the main branch as of 2026-06-17.
To Reproduce
- Create a Container Apps environment (e.g. internal or external).
- Run:
az containerapp env update \ --name <env> --resource-group <rg> \ --dns-suffix example.contoso.com \ --certificate-file ./cert.pfx \ --certificate-password <pwd> - Check the result:
az containerapp env show --name <env> --resource-group <rg> \ --query properties.customDomainConfigurationdnsSuffixisnull(the certificate fields are also not effectively applied because the
configuration is incomplete).
Expected behavior
customDomainConfiguration.dnsSuffix is set to the value passed via --dns-suffix, exactly as it is
on az containerapp env create.
Suggested fix
In ContainerappEnvPreviewUpdateDecorator.set_up_custom_domain_configuration(), set the suffix when
provided, e.g.:
if self.get_argument_hostname():
safe_set(self.managed_env_def, "properties", "customDomainConfiguration",
"dnsSuffix", value=self.get_argument_hostname())
Environment
- containerapp extension: 1.3.0b4 (bug also present on
main) - azure-cli: 2.87.0
- OS: Windows
Workaround
Set the custom DNS suffix at az containerapp env create time, or via a direct REST PATCH:
az rest --method patch \
--url "https://management.azure.com/subscriptions/<sub>/resourceGroups/<rg>/providers/Microsoft.App/managedEnvironments/<env>?api-version=2024-03-01" \
--body '{"properties":{"customDomainConfiguration":{"dnsSuffix":"example.contoso.com","certificateValue":"<base64-pfx>","certificatePassword":"<pwd>"}}}'
- Dominant language
- Python
- Stars
- 454
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 79
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Azure/azure-cli-extensions
-
Auto-Assign bug customer-reported Service Attention VM SSH
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Azure/azure-cli-extensions#10061 · 3 comments ·
-
customer-reported question Serial Console Service Attention
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Azure/azure-cli-extensions#9796 · 4 comments ·
-
Auto-Assign Azure Data Explorer bug Service Attention
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Azure/azure-cli-extensions#6876 · 2 comments ·
-
act-observability-squad Auto-Assign Azure CLI Team extension/app-insights extension/log-analytics Monitor question
Azure/azure-cli-extensions#10363 · 1 comment · 1 assignee ·
-
Auto-Assign Azure CLI Team feature-request Network Network - Front Door Service Attention
Azure/azure-cli-extensions#10335 · 1 comment · 1 assignee ·
All issues in Azure/azure-cli-extensions
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100