I am trying to set up a task definition for a Fargate container running from the latest image in a ECR repository. However, I can really get it to work. I am having this code so far:
const Repository = new ecr.Repository(this, 'Repository');
const TaskDefinition = new ecs.FargateTaskDefinition(this, "TaskDefinition", {})
TaskDefinition.addContainer("Container", {
image : ecs.EcrImage.fromEcrRepository(Repository, "latest")
})
However when I run it, I get Argument of type 'Repository' is not assignable to parameter of type 'IRepository'. I am trying to follow the documentation and have tried writing it a few different ways, but always the same error.