我正在模板化一个 EB 应用程序和多个环境。我想确保 ELB 设置为内部,但在 Cloudformation 文档中找不到引用。
最佳答案
您可以通过在 EB 的 aws:ec2:vpc
namespace 中设置 ELBScheme
属性,在 Elastic Beanstalk 应用程序中配置内部 Elastic Load Balancer。 :
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.
要在 CloudFormation 模板中配置此功能,请将该选项添加到 OptionSettings
您的属性(property)AWS::ElasticBeanstalk::Environment
资源:
Type: AWS::ElasticBeanstalk::Environment
Properties:
ApplicationName: !Ref AppName
SolutionStackName: !Ref SolutionStackName
OptionSettings:
-
Namespace: "aws:ec2:vpc"
OptionName: ELBScheme
Value: internal
关于amazon-web-services - 如何将 AWS ELB 内置于 AWS Cloudformation 模板中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41828215/