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개 답변
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
지원 엔지니어
Wayne_G
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠