Hello All, I am new to Pulumi and TypeScript. I've...
# typescript
m
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
happy to see you got it work.