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 Antwort
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-TECHNIKER
Wayne_G
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen