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

better-baker-47643

09/29/2021, 11:59 PM
Having an issue getting ApplicationLoadBalancers to point to a fargate service. Pulumi up runs and the fargate service deploys, but the ALB has no targets
Copy code
const lb = new awsx.lb.ApplicationLoadBalancer(`hasura-${env}`);

const listener = lb.createListener(`hasura-listener-${env}`, {
  protocol: "HTTPS",
  certificateArn: sslCertificateValidation.certificateArn,
});

const hasuraService = new awsx.ecs.FargateService(
  `hasura-${env}`,
  {
    cluster,
    desiredCount: 1,
    taskDefinitionArgs: {
      logGroup: logGroup,
      cpu: "1024",
      memory: "2048",
      containers: {
        service: {
          // logConfiguration: {
          //   logDriver: "awslogs",
          //   options: {
          //     "awslogs-group": logGroup.id,
          //     "awslogs-region": awsRegion!,
          //     "awslogs-stream-prefix": `hasura-${env}`,
          //   },
          // },
          image: hasuraImage,
          portMappings: [listener], ....
s

steep-toddler-94095

09/30/2021, 12:44 AM
hmm your code looks right to me. in the Details page of the Service is the Target Group Name filled out with the one in your first image?
b

better-baker-47643

09/30/2021, 1:21 AM
no, its not
here?
s

steep-toddler-94095

09/30/2021, 4:00 AM
I mean if you go to Clusters > cluster_name > service_name in the Details tab. Wondering if you see your
target group name
listed under
Load Balancing
or that fargate service
b

better-baker-47643

09/30/2021, 1:43 PM
ahh. ok, it is set
thanks
and the targets are there!
nothing like a little pulumi destory; pulumi up
success!! needed to add an inbound rule to a security group
🙌 1
now have to figure out how to set that in pulumi instead of the console