From 19c2ec03b8b7ce7812ae713ceca8f9f814037399 Mon Sep 17 00:00:00 2001 From: John Preston <1236150+JohnPreston@users.noreply.github.com> Date: Thu, 20 Jun 2024 11:35:02 +0100 Subject: [PATCH] Fix output for Service Subnets (#770) * Bump to 1.1.3 --- ecs_composex/__init__.py | 2 +- ecs_composex/ecs/ecs_family/__init__.py | 11 +++++++++-- pyproject.toml | 4 ++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ecs_composex/__init__.py b/ecs_composex/__init__.py index 8e0fb604..4846b8d6 100644 --- a/ecs_composex/__init__.py +++ b/ecs_composex/__init__.py @@ -5,4 +5,4 @@ __author__ = """John Preston""" __email__ = "john@compose-x.io" -__version__ = "1.1.2" +__version__ = "1.1.3" diff --git a/ecs_composex/ecs/ecs_family/__init__.py b/ecs_composex/ecs/ecs_family/__init__.py index 2e9f7ade..b49ed2ad 100644 --- a/ecs_composex/ecs/ecs_family/__init__.py +++ b/ecs_composex/ecs/ecs_family/__init__.py @@ -300,14 +300,21 @@ def generate_outputs(self): """ Generates a list of CFN outputs for the ECS Service and Task Definition """ - if self.service_networking.security_group: + if ( + self.service_compute.launch_type != "EXTERNAL" + and self.service_networking.security_group + ): self.outputs.append( CfnOutput( f"{self.logical_name}GroupId", Value=Ref(self.service_networking.security_group.parameter.title), ) ) - if ecs_params.SERVICE_SUBNETS.title in self.stack.stack_template.parameters: + if ( + self.service_networking.subnets_output + and isinstance(self.service_networking.subnets_output, Ref) + and self.service_compute.launch_type != "EXTERNAL" + ): self.outputs.append( CfnOutput( ecs_params.SERVICE_SUBNETS.title, diff --git a/pyproject.toml b/pyproject.toml index 7898edf4..b8cd0d9c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "ecs_composex" -version = "1.1.2" +version = "1.1.3" description = "Manage, Configure and Deploy your services and AWS services and applications from your docker-compose definition" authors = ["John Preston "] maintainers = ["John Preston "] @@ -84,7 +84,7 @@ sphinx-material = "^0.0.35" github_url = "https://github.com/compose-x/ecs_composex" [tool.tbump.version] -current = "1.1.2" +current = "1.1.3" regex = ''' (?P\d+) \.