Skip to content

Commit

Permalink
feat: pass properties for an image hosted in a
Browse files Browse the repository at this point in the history
public or private repository
  • Loading branch information
marsavar committed Jun 16, 2023
1 parent 1c63d49 commit d71884e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/constructs/ecs/ecs-task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Alarm, TreatMissingData } from "aws-cdk-lib/aws-cloudwatch";
import { SnsAction } from "aws-cdk-lib/aws-cloudwatch-actions";
import type { ISecurityGroup, IVpc } from "aws-cdk-lib/aws-ec2";
import type { IRepository } from "aws-cdk-lib/aws-ecr";
import type { RepositoryImageProps } from "aws-cdk-lib/aws-ecs";
import {
Cluster,
Compatibility,
Expand Down Expand Up @@ -53,6 +54,7 @@ export type RepositoryContainer = {

export type RegistryContainer = {
id?: string;
imageProps?: RepositoryImageProps;
type: "registry";
};

Expand Down Expand Up @@ -122,7 +124,7 @@ const getContainer = (config: ContainerConfiguration) => {
if (config.type == "repository") {
return ContainerImage.fromEcrRepository(config.repository, config.version);
} else {
return ContainerImage.fromRegistry(config.id ?? "ubuntu:focal");
return ContainerImage.fromRegistry(config.id ?? "ubuntu:jammy", config.imageProps);
}
};

Expand Down

0 comments on commit d71884e

Please sign in to comment.