我正在使用 Terraform 脚本创建 aws 弹性 beanstalk 环境,我需要在实例启动时启动一个 shell 脚本
我已经尝试过以下
resource "aws_elastic_beanstalk_environment" "Environment" {
name = "${var.ebs_env_name}"
application = "${var.ebs_app_name}"
---
---
---
setting = {
namespace = "aws:autoscaling:launchconfiguration"
name = "user_data"
value = "${file("user-data.sh")}"
}
}
这是抛出错误
申请计划时出错:
发生 1 个错误:
aws_elastic_beanstalk_environment.Environment:ConfigurationValidationException:配置验证异常:无效的选项规范(命名空间:'aws:autoscaling:launchconfiguration',OptionName:'user_data'):未知的配置设置。状态码:400,请求ID:xxxxx-xxxxxx
请帮忙