Reputation: 671
I am templating an EB app and several environments. I want to ensure that the ELB is set to be internal, but cant find the reference in the Cloudformation documentation.
Upvotes: 1
Views: 1395
Reputation: 20390
You can configure an internal Elastic Load Balancer within an Elastic Beanstalk application by setting the ELBScheme
property in the EB's aws:ec2:vpc
namespace:
Specify
internal
if you want to create an internal load balancer in your VPC so that your Elastic Beanstalk application cannot be accessed from outside your VPC.
To configure this within a CloudFormation template, add the option to the OptionSettings
property of your AWS::ElasticBeanstalk::Environment
resource:
Type: AWS::ElasticBeanstalk::Environment
Properties:
ApplicationName: !Ref AppName
SolutionStackName: !Ref SolutionStackName
OptionSettings:
-
Namespace: "aws:ec2:vpc"
OptionName: ELBScheme
Value: internal
Upvotes: 2
Reputation: 2700
It's the "Scheme" parameter: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-elb.html#cfn-ec2-elb-scheme
Accepts either 'internal' or 'internet-facing' as a string.
Upvotes: 1