diff --git a/airflow/providers/microsoft/azure/operators/container_instances.py b/airflow/providers/microsoft/azure/operators/container_instances.py index f00c933487419..deb5579f148b1 100644 --- a/airflow/providers/microsoft/azure/operators/container_instances.py +++ b/airflow/providers/microsoft/azure/operators/container_instances.py @@ -151,7 +151,7 @@ def __init__( self.ci_conn_id = ci_conn_id self.resource_group = resource_group - self.name = self._check_name(name) + self.name = name self.image = image self.region = region self.registry_conn_id = registry_conn_id @@ -370,9 +370,6 @@ def _log_last(self, logs: list | None, last_line_logged: Any) -> Any | None: @staticmethod def _check_name(name: str) -> str: - if "{{" in name: - # Let macros pass as they cannot be checked at construction time - return name regex_check = re.match("[a-z0-9]([-a-z0-9]*[a-z0-9])?", name) if regex_check is None or regex_check.group() != name: raise AirflowException('ACI name must match regex [a-z0-9]([-a-z0-9]*[a-z0-9])? (like "my-name")')