我正在尝试使用 terraform 创建 CodePipeline 作业。我已经有一个工作的 CodeBuild 项目。这是我的资源:
resource "aws_codepipeline" "my-project" {
name = "my-project"
role_arn = "${aws_iam_role.my-project-codepipeline.arn}"
artifact_store {
location = "${aws_s3_bucket.my-artifacts.bucket}"
type = "S3"
}
stage {
name = "Source"
action {
name = "Source"
category = "Source"
owner = "AWS"
provider = "CodeCommit"
version = "1"
configuration {
ProjectName = "my-project"
Branch = "master"
}
}
}
stage {
name = "Build"
action {
name = "Build"
category = "Build"
owner = "AWS"
provider = "CodeBuild"
version = "1"
configuration {
ProjectName = "my-project"
}
}
}
}
当我尝试terraform apply
我得到的错误是Error creating CodePipeline: InvalidActionDeclarationException: Action configuration for action 'Source' contains unknown configuration 'ProjectName'
. 在哪里可以找到此配置部分的正确架构?到目前为止,我发现的所有文档和示例都是通用的,并且省略了我在此处需要的特定 CodeBuild 设置/架构。