From e44297813e9c6d064e55b1a030f210fbc6142534 Mon Sep 17 00:00:00 2001 From: Marcelo <49801232+sellooh@users.noreply.github.com> Date: Wed, 16 Oct 2024 12:59:53 -0300 Subject: [PATCH] fix: container environment variables (#1202) * fix: container environment names * sync --------- Co-authored-by: Frank --- platform/src/components/aws/service.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/platform/src/components/aws/service.ts b/platform/src/components/aws/service.ts index 1749ed16a..0395b43d4 100644 --- a/platform/src/components/aws/service.ts +++ b/platform/src/components/aws/service.ts @@ -609,9 +609,8 @@ export class Service extends Component implements Link.Linkable { containerDefinitions: $jsonStringify( all([ containers, - args.environment ?? [], Link.propertiesToEnv(Link.getProperties(args.link)), - ]).apply(([containers, env, linkEnvs]) => + ]).apply(([containers, linkEnvs]) => containers.map((container) => { return { name: container.name, @@ -628,9 +627,10 @@ export class Service extends Component implements Link.Linkable { "awslogs-stream-prefix": "/service", }, }, - environment: Object.entries({ ...env, ...linkEnvs }).map( - ([name, value]) => ({ name, value }), - ), + environment: Object.entries({ + ...container.environment, + ...linkEnvs, + }).map(([name, value]) => ({ name, value })), linuxParameters: { initProcessEnabled: true, },