【问题标题】:AWS Elastic Beanstalk .ebextensions order of precedenceAWS Elastic Beanstalk .ebextensions 优先顺序
【发布时间】:2016-12-21 06:32:42
【问题描述】:

如果我在 .ebextensions 文件夹中的两个配置文件中应用设置,最后一个文件是否会覆盖第一个文件中的设置?

例如获取两个定义了实例角色设置的文件:

.ebextensions/0001-base.config

option_settings:
  IamInstanceProfile: aws-ec2-role

.ebextensions/0010-app.config

option_settings:
  IamInstanceProfile: aws-app-role

Beanstalk EC2 实例将被赋予哪个角色? aws-ec2-role 还是 aws-app-role?

【问题讨论】:

    标签: amazon-web-services amazon-elastic-beanstalk ebextensions


    【解决方案1】:

    .ebextensions 按字母顺序执行,因此aws-app-role 将是您的 IamInstanceProfile 选项设置的最终结果。

    如果您尝试部署 .ebextensions,您的语法会导致编译错误,这是执行您想要的操作的正确方法。

    option_settings:
          "aws:autoscaling:launchconfiguration":
              IamInstanceProfile: aws-app-role
    

    【讨论】:

      猜你喜欢
      • 2018-06-05
      • 2017-04-11
      • 2020-08-17
      • 1970-01-01
      • 2015-01-04
      • 2020-08-27
      • 2013-12-20
      • 2016-05-12
      • 2017-06-22
      相关资源
      最近更新 更多