Hi there, hoping someone can point out a working configuration of AWS ECS Fargate with ALB config, n...
t
Hi there, hoping someone can point out a working configuration of AWS ECS Fargate with ALB config, no matter how I try setting the Fargate portMappings I get the following error:
Copy code
error: preview failed
 
    panic: interface conversion: interface {} is string, not int
    goroutine 184 [running]:
    <http://github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsEcsLoadBalancerHash(0x556d040|github.com/terraform-providers/terraform-provider-aws/aws.resourceAwsEcsLoadBalancerHash(0x556d040>, 0xc002350420, 0xc00232fa10)
        /home/runner/go/pkg/mod/github.com/pulumi/terraform-provider-aws@v1.38.1-0.20201023104507-9632e543c200/aws/resource_aws_ecs_service.go:1169 +0x47f
Offending config - note the portMappings, first line is ok, fails when using the ApplicationListener, have also tried the NetworkListener
Copy code
const httpListener = new awsx.lb.ApplicationListener("http-listener", {
        external: true,
        port: 80,        
    });

    let actAdminService = new awsx.ecs.FargateService(serviceName, {
        name: serviceName,
        cluster,
        desiredCount: 1,
        serviceRegistries: {
            registryArn: discoveryService.arn,
        },
        taskDefinitionArgs: {
            container: {
                image: imageName,
                memory: 256,
                portMappings: [
                    // THIS WORKS { containerPort: 80, hostPort: 80, protocol: "tcp" }, { containerPort: 443, hostPort: 443, protocol: "tcp" }
                    httpListener //THIS FAILS
                ],                
            },
            executionRole: execRole,

        },
        platformVersion: context.defaultPlatformVersion,

    });
As well as https://medium.com/it-dead-inside/deploy-aws-fargate-clusters-with-pulumi-e06637e6821d and example here https://www.pulumi.com/blog/get-started-with-docker-on-aws-fargate-using-pulumi/