amazon-web-servicesterraformamazon-ecsaws-codepipelineaws-regions

Terraform CodePipeline ActionType in action 'Deploy' is not available


Trying to create AWS CodePipeline using Terraform. While applying resource aws_codepipeline > Deploy action, I'm getting below error:

* 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

The terraform configuration is:

  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 region is 'ap-south-1'.

Any pointer's on what's wrong here?


Solution

  • Figured it out.

    The issue is from provider end. AWS CodePipeline doesn't support deployments to Amazon ECS in region ap-south-1 as of yet.

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