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 Risposta
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
TECNICO DI SUPPORTO
Wayne_G
con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande