So the thing is:
I have this resource creation set for AWS Cloudformation using ElasticBeanstalk, which creates additional internal_loadbalancer:
Resources:
IntLB:
Type: AWS::ElasticLoadBalancing::LoadBalancer
Properties:
ConnectionDrainingPolicy:
Enabled: true
Timeout: 20
CrossZone: true
HealthCheck:
HealthyThreshold: 3
Interval: 10
Target: "TCP"
Timeout: 5
UnhealthyThreshold: 5
Listeners:
- InstancePort: 443
LoadBalancerPort: 443
Protocol: HTTPS
SSLCertificateId: arn:aws:acm:
InstanceProtocol: HTTP
Scheme: internal
SecurityGroups:
- { "Ref" : "AWSEBLoadBalancerSecurityGroup" }
Subnets:
- "subnet-1"
- "subnet-2"
- "subnet-3"
- "subnet-4"
- "subnet-5"
- "subnet-6"
AWSEBAutoScalingGroup:
Type: AWS::AutoScaling::AutoScalingGroup
Properties:
LoadBalancerNames:
- { "Ref" : "AWSEBLoadBalancer" }
- { "Ref" : "IntLB" }
What I would like to do is write a condition that if environment_ID = XYZ then apply the creation of the resource and if not ignore it.
I was looking around for AWS documentation and forums but I'm not sure what would be the correct approach.
Any ideas ?
Thanks!