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

average-kilobyte-47828

10/30/2020, 9:15 AM
I have 2 fargate services that need to be registered with 2 different target groups. The awsx examples use
portMappings: [listener]
, which looks like a bit of magic. It uses listeners default target group. Can I provide a target group directly instead of a listener?
b

broad-gold-44713

10/30/2020, 8:34 PM
@average-kilobyte-47828 I had to use
portMappings: [{containerPort: xxxx}]
in the taskDefinition and in the service definition:
Copy code
loadBalancers: [
          {
            containerName: '<containerName>',
            containerPort: xxx,
            targetGroupArn: <targetGroupArn>
          }
        ]
👍 1
a

average-kilobyte-47828

10/30/2020, 10:16 PM
Thanks, I'll see if I can get that to work somehow.
Thanks @broad-gold-44713, this works great
👍 1