使用 .ebextensions 创建 WaitConditionHandle
Creating WaitConditionHandle using .ebextensions
我正在尝试使用 AWS Elastic Beanstalk 配置文件 (.ebextensions
) 在 ElasticBeanstalk 应用程序部署期间创建 WaitConditionHandle
。
配置文件在yaml
下面是内容,创建如下CloudFormation docs:
Resources:
ELBWaitConditionHandle:
Type: AWS::CloudFormation::WaitConditionHandle
Properties:
部署应用程序时,ElasticBeanstalk 在事件日志中显示以下错误:
ERROR Service:AmazonCloudFormation, Message:[/Resources/ELBWaitConditionHandle/Properties] 'null' values are not allowed in templates
ElasticBeanstalk 的 CloudFormation 堆栈未更新,因此它甚至在 运行 堆栈更新之前验证失败。
将配置从 YAML 转换为 JSON 结果如下,并解释了我遇到的错误:
{
"Type": "AWS::CloudFormation::WaitConditionHandle",
"Properties": null
}</pre>
因此,我将 AWS 文档中给出的 JSON syntax 转换为 YAML,结果如下:
Type: AWS::CloudFormation::WaitConditionHandle
Properties: {}</pre>
通过以上,ElasticBeanstalk 正在创建 WaitConditionHandle。
我正在尝试使用 AWS Elastic Beanstalk 配置文件 (.ebextensions
) 在 ElasticBeanstalk 应用程序部署期间创建 WaitConditionHandle
。
配置文件在yaml
下面是内容,创建如下CloudFormation docs:
Resources:
ELBWaitConditionHandle:
Type: AWS::CloudFormation::WaitConditionHandle
Properties:
部署应用程序时,ElasticBeanstalk 在事件日志中显示以下错误:
ERROR Service:AmazonCloudFormation, Message:[/Resources/ELBWaitConditionHandle/Properties] 'null' values are not allowed in templates
ElasticBeanstalk 的 CloudFormation 堆栈未更新,因此它甚至在 运行 堆栈更新之前验证失败。
将配置从 YAML 转换为 JSON 结果如下,并解释了我遇到的错误:
{ "Type": "AWS::CloudFormation::WaitConditionHandle", "Properties": null }</pre>
因此,我将 AWS 文档中给出的 JSON syntax 转换为 YAML,结果如下:
Type: AWS::CloudFormation::WaitConditionHandle Properties: {}</pre>
通过以上,ElasticBeanstalk 正在创建 WaitConditionHandle。