【发布时间】:2020-08-29 16:43:22
【问题描述】:
我正在尝试使用 terrafrom 配置 AWS Elastic Beanstalk。下面是我写的.tf文件:
resource "aws_s3_bucket" "default" {
bucket = "textX"
}
resource "aws_s3_bucket_object" "default" {
bucket = "${aws_s3_bucket.default.id}"
key = "test-app-version-tf--dev"
source = "somezipFile.zip"
}
resource "aws_elastic_beanstalk_application_version" "default" {
name = "tf-test-version-label"
application = "tf-test-name"
description = "application version created by terraform"
bucket = "${aws_s3_bucket.default.id}"
key = "${aws_s3_bucket_object.default.id}"
}
resource "aws_elastic_beanstalk_application" "tftest" {
name = "tf-test-name"
description = "tf-test-name"
}
resource "aws_elastic_beanstalk_environment" "tfenvtest" {
description = "test"
application = "${aws_elastic_beanstalk_application.tftest.name}"
name = "synchronicity-dev"
cname_prefix = "ops-api-opstest"
solution_stack_name = "64bit Amazon Linux 2 v5.0.1 running Node.js 12"
tier = "WebServer"
wait_for_ready_timeout = "20m"
}
根据the official documentation,我正在为aws_elastic_beanstalk_environment 模块提供所有必需的参数。
但是,在执行脚本时,我收到以下错误:
等待 Elastic Beanstalk 环境 (e-39m6ygzdxh) 时出错 准备就绪:发生 2 个错误: * 2020-05-13 12:59:02.206 +0000 UTC (e-3xff9mzdxh) :您必须为此区域中的 EC2 实例指定实例配置文件。请参阅 Managing Elastic Beanstalk Instance Profiles 了解更多信息。 * 2020-05-13 12:59:02.319 +0000 UTC (e-3xff9mzdxh) : 启动环境失败。
【问题讨论】:
-
您使用的是哪个地区?
-
@HelderSepulveda,脚本正在使用“eu-west-1”区域。
-
我在
"us-east-1"的错误中得到了同样的结果 -
有根据的猜测:API 发生了一些变化,Terraform AWS 提供商还没有赶上
-
我在使用 terraform 0.12.24 的 us-west-2 中遇到了同样的错误
标签: terraform terraform-provider-aws