Skip to content
This repository was archived by the owner on Oct 21, 2024. It is now read-only.

Commit dc4d359

Browse files
committed
Efs: fix type error
1 parent 23cde01 commit dc4d359

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

platform/src/components/aws/service.ts

+13-16
Original file line numberDiff line numberDiff line change
@@ -624,22 +624,19 @@ export class Service extends Component implements Link.Linkable {
624624
taskRoleArn: taskRole.arn,
625625
volumes: output(containers).apply((containers) => {
626626
const uniqueFileSystemIds: Set<string> = new Set();
627-
return containers
628-
.flatMap(
629-
(container) =>
630-
container.volumes?.map((volume) => {
631-
if (uniqueFileSystemIds.has(volume.efs)) return;
632-
uniqueFileSystemIds.add(volume.efs);
633-
return {
634-
name: volume.efs,
635-
efsVolumeConfiguration: {
636-
fileSystemId: volume.efs,
637-
transitEncryption: "ENABLED",
638-
},
639-
};
640-
}),
641-
)
642-
.filter((v) => !!v);
627+
return containers.flatMap((container) =>
628+
(container.volumes ?? []).flatMap((volume) => {
629+
if (uniqueFileSystemIds.has(volume.efs)) return [];
630+
uniqueFileSystemIds.add(volume.efs);
631+
return {
632+
name: volume.efs,
633+
efsVolumeConfiguration: {
634+
fileSystemId: volume.efs,
635+
transitEncryption: "ENABLED",
636+
},
637+
};
638+
}),
639+
);
643640
}),
644641
containerDefinitions: $jsonStringify(
645642
all([

0 commit comments

Comments
 (0)