0

尝试使用 Terraform 创建 AWS CodePipeline。在应用资源 aws_codepipeline > 部署操作时,出现以下错误:

* module.pipeline.aws_codepipeline.pipeline: 1 error(s) occurred:

* aws_codepipeline.pipeline: [ERROR] Error creating CodePipeline: InvalidActionDeclarationException: ActionType (Category: 'Deploy', Provider: 'ECS', Owner: 'AWS', Version: '1') in action 'Deploy' is not available
        status code: 400, request id: 276a85b8-60f0-11e8-8152-6160c01dc881

地形配置是:

  resource "aws_codepipeline" "pipeline" {
  name     = "${var.cluster_name}-pipeline"
  role_arn = "${aws_iam_role.codepipeline_role.arn}"

  artifact_store {
    location = "${aws_s3_bucket.source.bucket}"
    type     = "S3"
  }

  stage {
    name = "Production"

    action {
      name            = "Deploy"
      category        = "Deploy"
      owner           = "AWS"
      provider        = "ECS"
      input_artifacts = ["imagedefinitions"]
      version         = "1"

      configuration {
        ClusterName = "${var.cluster_name}"
        ServiceName = "${var.app_service_name}"
        FileName    = "imagedefinitions.json"
      }
    }
  }
}

AWS 区域是“ap-south-1”。

有什么关于这里有什么问题的指针吗?

4

1 回答 1

0

弄清楚了。

问题来自提供者端。AWS CodePipeline 尚不支持在区域ap-south-1内部署到 Amazon ECS。

https://aws.amazon.com/about-aws/whats-new/2017/12/aws-codepipeline-adds-support-for-amazon-ecs-and-aws-fargate/

于 2018-05-27T10:23:06.023 回答