https://pulumi.com logo
#typescript
Title
# typescript
m

melodic-family-5784

11/04/2019, 6:38 PM
Hello All, I am new to Pulumi and TypeScript. I've been trying to extend the example at...https://www.pulumi.com/blog/get-started-with-docker-on-aws-fargate-using-pulumi/ to include a statsd sidecar. I am currently stuck trying to define the containerPorts. I've tried the following:
Copy code
const statsdPortProtocol: aws.ecs.Protocol = 'udp';
const statsdAdminPortProtocol: aws.ecs.Protocol = 'tcp';
const statsdPort = { port: 8125, protocol: statsdPortProtocol };
const statsdAdminPort = { port: 8126, protocol: statsdAdminPortProtocol };
and used it as
Copy code
portMappings: [statsdPort, statsdAdminPort]
but I am getting the error:
Copy code
Invalid 'containerPort' setting for container 'statsd'.
Any help would be appreciated.
OOOPS! Looks like user error. I should have created an object with the field
containerPort
instead of
port
.
q

quaint-artist-58613

11/28/2019, 11:01 PM
happy to see you got it work.
3 Views