https://pulumi.com logo
#general
Title
# general
k

kind-ambulance-33034

03/11/2019, 9:54 PM
Hi I was wondering if there is a way to map a port. I have something like this:``` let service = new cloud.Service("MyService", { containers: { Api: { image: "MY_IMAGE", memory: 256, ports: [{ port: 8081 }], }, }, replicas: 1, });``` I am willing to use the port 80 instead of 8081 which is the port exposed by the container.
c

creamy-potato-29402

03/12/2019, 1:59 AM
cc @lemon-spoon-91807
l

lemon-spoon-91807

03/12/2019, 3:10 AM
Hey Rene, you should be able to provide both 'port' and 'targetPort' to help control this
✔️ 1
Note: our recommendation too is (if you're on AWS) to move to awsx.ecs.FargateService or awsx.ecs.EC2Service
as they are much more flexible and powerful. cheers!
k

kind-ambulance-33034

03/12/2019, 2:47 PM
awesome, thanks Cyrus. I will move to FargateService, that’s the one I am using right now.