pulumi-aws icon indicating copy to clipboard operation
pulumi-aws copied to clipboard

Creating an aws target group of type alb doesn't work

Open AlmogVonage opened this issue 3 years ago β€’ 3 comments
trafficstars

Hello!

  • Vote on this issue by adding a πŸ‘ reaction
  • To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already)

Issue details

when trying to create an aws target group of type β€˜alb’ we get the following: error: aws:lb/targetGroup:TargetGroup resource 'internal-lb-target-group' has a problem: expected target_type to be one of [instance ip lambda], got alb. Examine values at 'TargetGroup.TargetType'. The 'alb' type does not seems to be supported by pulumi.

Steps to reproduce

The code that creates the target group:

    const internalLbTargetGroup = new aws.lb.TargetGroup("internal-lb-target-group", {
        name: "studio-internal-lb-target-group",
        targetType: "alb",
        port: 80,
        protocol: "HTTP",
        vpcId: vpc.id,
        healthCheck: {
            path: "/api/health",
            interval: 10,
            enabled: true,
        },
        tags: {
            Owner: "studio",
            project: "studio"
        },
    });

Expected: Target group of type alb to be created Actual: error creating

AlmogVonage avatar Mar 01 '22 17:03 AlmogVonage

Hi there! I'm also posting my response from our chat in Slack. I've stood up a similar bit of code, and I can create one with the ALB target type. The error comes because of the HTTP protocol. For the ALB target type, the only protocol allowed is TCP:

  1. For Protocol, only TCP is allowed. Select the Port for your target group. This target group port must match the listener port of the Application Load Balancer. Alternatively, you can add or edit the listener port on the Application Load Balancer to match this port.

https://docs.aws.amazon.com/elasticloadbalancing/latest/network/application-load-balancer-target.html#register-application-load-balancer-target

nimbinatus avatar Mar 01 '22 20:03 nimbinatus

Unfortunately, there's an example that illustrates this use case in the upstream repo that we drop. I'll look into see what we can do to ensure it's not dropped.

jkodroff avatar Mar 01 '22 21:03 jkodroff

Thanks a lot, you have been really helpful!

On Tue, Mar 1, 2022 at 10:03 PM Josh Kodroff @.***> wrote:

Unfortunately, there's an example that illustrates this use case in the upstream repo that we drop. I'll look into see what we can do to ensure it's not dropped.

β€” Reply to this email directly, view it on GitHub https://github.com/pulumi/pulumi-aws/issues/1844#issuecomment-1055854229, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUGNGBPFVEMAAEP7DLQEXLTU52AY7ANCNFSM5PUVHUVA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

AlmogVonage avatar Mar 02 '22 08:03 AlmogVonage