I have create a WAF and an Elastic Beanstalk with ALB like this:
TestTemplate:
Type: 'AWS::ElasticBeanstalk::ConfigurationTemplate'
Properties:
ApplicationName: !Ref TestApplication
Description: Test
SolutionStackName: '64bit Amazon Linux 2 v3.5.7 running PHP 8.1'
OptionSettings:
...
# Environment
- Namespace: aws:elbv2:loadbalancer
OptionName: SecurityGroups
Value: !Ref TravelManagerPrdElbEnv
The WAF snippet and EB are all in a same stack. How do I integrate the WAF with ALB of the EB ? I know there is this "WebACLAssociation" but in this case, I do not know how to get ALB's ARN .. Please help