How to add condition in elbsg.config in ebextensions for elasticbeanstak

0

Currently, we use docker-compose and .ebextensions to update elastic load balancer security group. However now I have requirement to apply different security groups for different environment. How do I add the condition to elbsg.config ? Below is my current elbsg.config

option_settings:
 aws:elb:loadbalancer:
  ManagedSecurityGroup: "sg-xxxxxx"
  SecurityGroups: "sg-xxxxx"
 aws:elbv2:loadbalancer:
  ManagedSecurityGroup: "sg-x"xxxx
  SecurityGroups: "sg-xxxxx"

Wondering if the normal yaml condition would works or there is a separate syntax for elbsg.config to work ?

1 Answer
0

You will likely need to have a separate bundle for the new environment which has the needed settings in it, as there is no constructs for setting up a conditional option_settings entry. Similarly, the YAML standard itself does not specify any such conditionals, though some tooling (such as CloudFormation) has its own special syntax for this type of need.

AWS
SUPPORT ENGINEER
Wayne_G
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions