I wonder why this question is so poorly documented and it is hard to find an answer or sample, even though extensions under .ebextensions folder seem be a convenient way to work with environments within CI/CD process.
The proper way how to get 'application' load balancer created in Elastic Beansltalk environment is to use AWS::ElasticLoadBalancingV2::LoadBalancer inside your .config file specifying resources.
Sample:
Resources:
AWSEBV2LoadBalancer:
Type: AWS::ElasticLoadBalancingV2::LoadBalancer
Properties:
Scheme: internet-facing
AWS::ElasticLoadBalancingV2::LoadBalancer specification:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-loadbalancer.html
The specification says that it is possible to set 'network' or 'gateway' load balancers as "Type" property, in turn, the other doc (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/environments-cfg-alb.html) says that it is not possible and you should use aws:elasticbeanstalk:environment option inside the options file configuration.
Whatever is true, the sample above works perfectly fine for 'application' load balancer since 'application' is the default type for V2.
Please note, that if you use ElasticLoadBalancingV2 load balancer, then you also have to use V2 listeners, target groups etc., as well as, V2 options (e.g. aws:elbv2:loadbalancer) inside your options configuration file
Sample for V2 listeners: https://github.com/awsdocs/elastic-beanstalk-samples/blob/b5e8eaea6a0acca6b80281d4f1afe408a50e1afb/configuration-files/aws-provided/resource-configuration/alb-http-to-https-redirection-full.config