Skip to content

Commit

Permalink
Fixing up condition for external workload
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnPreston committed Jun 19, 2024
1 parent 9f35e0e commit 557090a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
7 changes: 7 additions & 0 deletions ecs_composex/common/stacks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,13 @@ def set_vpc_parameters_from_vpc_stack(
APP_SUBNETS,
]
add_parameters(self.stack_template, default_parameters)
print(
"STACK TEMPLATE?",
self.stack_template,
type(self.stack_template),
self.stack_template.parameters,
)
print("ADDED DEFAULT PARAMS")
if (
self.parent_stack
and self.parent_stack is not None
Expand Down
11 changes: 8 additions & 3 deletions ecs_composex/ecs/ecs_family/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,15 +300,20 @@ 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 self.service_networking.subnets_output and isinstance(
self.service_networking.subnets_output, Ref
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(
Expand Down

0 comments on commit 557090a

Please sign in to comment.