https://pulumi.com logo
#aws
Title
c

cuddly-smartphone-15267

12/03/2020, 12:16 PM
I’m still learning docker and ECS but let’s say I have an ECR repo and I’ve pushed my docker image there, what resources do I need to add in pulumi to be able to utilise the image? I’ve gotten as far as getting a load balancer set up with ssl cert. now I would like to point it at a docker app. I can’t use fargate as it’s a windows docker image.
b

broad-dog-22463

12/03/2020, 12:52 PM
If the app is just running on an ec2 instance then you will need to point your lb at that ec2 instance and give it the correct port security group to be able to access the container
w

witty-candle-66007

12/03/2020, 3:25 PM
I don’t know if this helps, but this example uses ECS with container instances: https://github.com/pulumi/examples/blob/aws-ecs-conatiner-instances-automation/aws-py-ecs-instances-autoapi/py-ecs-instance/__main__.py There are a number of moving parts to create an ECS cluster using container instances - including IAM roles, and the like.
c

cuddly-smartphone-15267

12/03/2020, 9:12 PM
i think that is exactly what i was looking for Mitch. I'll read through it carefully!
@witty-candle-66007: is the
container_definitions
section in the
TaskDefinition
where I would (somehow) point it to my docker app inside the EKR repo?
w

witty-candle-66007

12/03/2020, 10:09 PM
Yes. I believe you would specify your ECR-located image as per the “image” section on this page: https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html
c

cuddly-smartphone-15267

12/03/2020, 10:27 PM
ok, perfect