diff --git a/src/containerapp/azext_containerapp/custom.py b/src/containerapp/azext_containerapp/custom.py index 58f5f65dd49..e6d003d13d6 100644 --- a/src/containerapp/azext_containerapp/custom.py +++ b/src/containerapp/azext_containerapp/custom.py @@ -504,6 +504,11 @@ def update_containerapp_logic(cmd, from_revision=None): _validate_subscription_registered(cmd, CONTAINER_APPS_RP) + # Validate that max_replicas is set to 0-30 + if max_replicas is not None: + if max_replicas < 1 or max_replicas > 30: + raise ArgumentUsageError('--max-replicas must be in the range [1,30]') + if yaml: if image or min_replicas or max_replicas or\ set_env_vars or remove_env_vars or replace_env_vars or remove_all_env_vars or cpu or memory or\