I have a CloudFormation Template that defines an Elastic Beanstalk Application.
I want to extend this application, i.e. I want the listener at port 80 to redirect to HTTPS. The AWS::ElasticBeanstalk::Environment properties do not allow for this configuration options: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options-general.html
All I can find tells me to add the Listener resource configuration in the .ebextensions, but I have no idea how to integrate this .ebextensions with the CloudFormation Template.
I have tried using the .ebextensions folder as usual but that's no good. I also tried integrating the resource directly in the same template, but I have no way of getting the ARN I need from the EB setup, since it is not exported from the stack or exposed by the resource. I even gave up and tried setting up a shared application load balancer, but it is way more complex and not really solving my issue.
I tried Redirect HTTP to HTTPS for Application Loadbalancer in Elastic Beanstalk in Cloudformation and the pointer at https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environment-resources.html but none of it indicates how to integrate that with a main CloudFormation Template.
I'm really lost here.