RazvanPtS
RazvanPtS

Reputation: 11

AWS Codepipeline with Github Version 1

I want to create a Codepipeline in AWS with Terraform that uses Github Version 1 (Using AWS Codestar is not really a solution). Is it still possible and if yes how? I've tried creating a piepline but I get the following error message:

Error creating CodePipeline: InvalidActionDeclarationException: ActionType (Category: 'Source', Provider: 'Github', Owner: 'ThirdParty', Version: '1') in action 'Source' is not available in region EU_CENTRAL_1

Edit : Pipeline code

resource "aws_codepipeline" "ecs_pipeline" {
 ...
  stage {
    name = "Source"
    action {
      name             = "Source"
      category         = "Source"
      owner            = "ThirdParty"
      provider         = "Github"
      version          = 1
      run_order        = 1
      output_artifacts = ["SourceArtifact"]
      configuration = {

        RepositoryName       = var.repo_name
        BranchName           = var.branch
        OAuthToken           = var.github_oauth_token
        Owner                = var.repo_owner
      }
    }
  }
  stage {
    name = "Build"
    ...
  }
  stage {
    name = "Deploy"
    ...
  }
}

Upvotes: 0

Views: 963

Answers (1)

RazvanPtS
RazvanPtS

Reputation: 11

Figured it out, some configuration variable names were wrong

stage {
    name = "Source"
    action {
      name             = "Source"
      category         = "Source"
      owner            = "ThirdParty"
      provider         = "GitHub"
      version          = 1
      run_order        = 1
      output_artifacts = ["SourceArtifact"]
      configuration = {
        Repo             = var.repo_name
        Branch           = var.branch
        OAuthToken       = var.github_oauth_token
        Owner            = var.repo_owner
      }
    }
  }

Upvotes: 1

Related Questions