Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/containerapp/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Release History
===============
upcoming
++++++
* 'az containerapp create': fix `InvalidArgumentValueError` exception when binding has `-` dash in its name.

0.3.36
++++++
* 'az containerapp hostname bind': fix exception when not bringing --validation-method inputs
Expand Down
2 changes: 1 addition & 1 deletion src/containerapp/azext_containerapp/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ def process_service(cmd, resource_list, service_name, arg_dict, subscription_id,


def validate_binding_name(binding_name):
pattern = r'^(?=.{1,60}$)[a-zA-Z0-9._]+$'
pattern = r'^(?=.{1,60}$)[a-zA-Z0-9._-]+$'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a message for this validate_binding_name, I'm not sure this binding name is available if it contains -

raise InvalidArgumentValueError("The Binding Name can only contain letters, numbers (0-9), periods ('.'), "
                                            "and underscores ('_'). The length must not be more than 60 characters.")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @yash-nisar Do you know whether the binding name can contains - ?

return bool(re.match(pattern, binding_name))


Expand Down