Skip to content

Commit

Permalink
Bugfix Environment Secrets overlap (#714)
Browse files Browse the repository at this point in the history
  • Loading branch information
thorfi authored Nov 21, 2023
1 parent 0cc3b9f commit cc9f9b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ecs_composex/ecs/ecs_family/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,8 @@ def sort_env_vars(
_secret.Name
for _secret in getattr(service.container_definition, "Secrets", [])
]
for _index, _env in enumerate(sorted_env):
# Iterate in reverse for popping so we don't mess up indexes
for _index, _env in reversed(tuple(enumerate(sorted_env))):
if _env.Name in secrets_names:
LOG.warning(
"services.{}: Environment variable {} overlaps with Secret. Removing.".format(
Expand Down

0 comments on commit cc9f9b4

Please sign in to comment.