diff --git a/ecs_composex/dns/dns_conditions.py b/ecs_composex/dns/dns_conditions.py index 311d9e642..031929238 100644 --- a/ecs_composex/dns/dns_conditions.py +++ b/ecs_composex/dns/dns_conditions.py @@ -47,4 +47,8 @@ ) PRIVATE_NAMESPACE_CON_T = "PrivateNamespaceConditionSet" -PRIVATE_NAMESPACE_CON = Not(Equals(Ref(dns_params.PRIVATE_NAMESPACE_ID), dns_params.PRIVATE_NAMESPACE_ID.Default)) +PRIVATE_NAMESPACE_CON = Not( + Equals( + Ref(dns_params.PRIVATE_NAMESPACE_ID), dns_params.PRIVATE_NAMESPACE_ID.Default + ) +) diff --git a/ecs_composex/ecs/ecs_service.py b/ecs_composex/ecs/ecs_service.py index fee702038..96f3ac87f 100644 --- a/ecs_composex/ecs/ecs_service.py +++ b/ecs_composex/ecs/ecs_service.py @@ -57,9 +57,12 @@ PRIVATE_DNS_ZONE_ID, PUBLIC_DNS_ZONE_ID, PUBLIC_DNS_ZONE_NAME, - PRIVATE_NAMESPACE_ID + PRIVATE_NAMESPACE_ID, +) +from ecs_composex.dns.dns_conditions import ( + PRIVATE_ZONE_ID_CON_T, + PRIVATE_NAMESPACE_CON_T, ) -from ecs_composex.dns.dns_conditions import PRIVATE_ZONE_ID_CON_T, PRIVATE_NAMESPACE_CON_T from ecs_composex.ecs import ecs_params, ecs_conditions from ecs_composex.ecs.ecs_conditions import USE_HOSTNAME_CON_T from ecs_composex.ecs.ecs_params import SERVICE_NAME, SERVICE_HOSTNAME diff --git a/ecs_composex/ecs/ecs_template.py b/ecs_composex/ecs/ecs_template.py index 3a5d6c8b5..64e939fde 100644 --- a/ecs_composex/ecs/ecs_template.py +++ b/ecs_composex/ecs/ecs_template.py @@ -125,7 +125,9 @@ def initialize_service_template(service_name): service_tpl.add_condition( dns_conditions.PRIVATE_ZONE_ID_CON_T, dns_conditions.PRIVATE_ZONE_ID_CON ) - service_tpl.add_condition(dns_conditions.PRIVATE_NAMESPACE_CON_T, dns_conditions.PRIVATE_NAMESPACE_CON) + service_tpl.add_condition( + dns_conditions.PRIVATE_NAMESPACE_CON_T, dns_conditions.PRIVATE_NAMESPACE_CON + ) return service_tpl