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 réponse
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
INGÉNIEUR EN ASSISTANCE TECHNIQUE
Wayne_G
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions