Git Product home page Git Product logo

terraform-aws-codebuild's Introduction

terraform-aws-codebuild Build Status

Terraform module to create AWS CodeBuild project for AWS CodePipeline

Usage

Include this repository as a module in your existing terraform code:

module "build" {
    source              = "git::https://github.com/cloudposse/terraform-aws-codebuild.git?ref=master"
    namespace           = "general"
    name                = "ci"
    stage               = "staging"
    
    # http://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref.html
    build_image         = "aws/codebuild/docker:1.12.1"
    build_compute_type  = "BUILD_GENERAL1_SMALL"
    
    # These attributes are optional, used as ENV variables when building Docker images and pushing them to ECR
    # For more info:
    # http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html
    # https://www.terraform.io/docs/providers/aws/r/codebuild_project.html
    
    privileged_mode     = "true"
    aws_region          = "us-east-1"
    aws_account_id      = "xxxxxxxxxx"
    image_repo_name     = "ecr-repo-name"
    image_tag           = "latest"
}

Input

Name Default Description
namespace global Namespace
stage default Stage
name codebuild Name
build_image aws/codebuild/docker:1.12.1 Docker image for build environment, e.g. aws/codebuild/docker:1.12.1 or aws/codebuild/eb-nodejs-6.10.0-amazonlinux-64:4.0.0
build_compute_type BUILD_GENERAL1_SMALL CodeBuild instance size. Possible values are: BUILD_GENERAL1_SMALL BUILD_GENERAL1_MEDIUM BUILD_GENERAL1_LARGE
buildspec "" (Optional) buildspec declaration to use for building the project
privileged_mode "" (Optional) If set to true, enables running the Docker daemon inside a Docker container on the CodeBuild instance. Used when building Docker images
aws_region "" (Optional) AWS Region, e.g. us-east-1. Used as CodeBuild ENV variable when building Docker images
aws_account_id "" (Optional) AWS Account ID. Used as CodeBuild ENV variable when building Docker images
image_repo_name "UNSET" (Optional) ECR repository name to store the Docker image built by this module. Used as CodeBuild ENV variable when building Docker images
image_tag "latest" (Optional) Docker image tag in the ECR repository, e.g. latest. Used as CodeBuild ENV variable when building Docker images
github_token "" (Optional) GitHub auth token environment variable (GITHUB_TOKEN)

Output

Name Decription
project_name CodeBuild project name
project_id CodeBuild project ARN
role_arn IAM Role ARN

License

Apache 2 License. See LICENSE for full details.

terraform-aws-codebuild's People

Contributors

aknysh avatar goruha avatar robinbowes avatar

Watchers

James Cloos avatar Paulo Marchi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.