gpt4 book ai didi

CodeBuild 源阶段的 terraform AWS CodePipeline 配置

转载 作者:行者123 更新时间:2023-12-04 03:06:13 29 4
gpt4 key购买 nike

我正在尝试使用 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 设置/架构。

最佳答案

原来我需要的源设置是

RepositoryName = "my-project"
BranchName = "master"

关于CodeBuild 源阶段的 terraform AWS CodePipeline 配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44118894/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com