Giter Site home page Giter Site logo

asmtal / terraform-aws-codebuild Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tmknom/terraform-aws-codebuild

0.0 0.0 0.0 45 KB

Terraform module which creates CodeBuild resources on AWS.

License: Apache License 2.0

Makefile 8.65% HCL 91.35%

terraform-aws-codebuild's Introduction

terraform-aws-codebuild

Terraform Actions Status Markdown Actions Status YAML Actions Status JSON Actions Status GitHub tag License

Terraform module which creates CodeBuild resources on AWS.

Description

Provision CodeBuild_Projects and CodeBuild Service Role.

This module provides recommended settings:

  • Support CodePipeline

Usage

Minimal

module "codebuild" {
  source = "git::https://github.com/tmknom/terraform-aws-codebuild.git?ref=tags/2.0.0"
  name   = "example"
}

Complete

module "codebuild" {
  source = "git::https://github.com/tmknom/terraform-aws-codebuild.git?ref=tags/2.0.0"
  name   = "example"

  artifact_bucket_arn = var.artifact_bucket_arn
  environment_type    = "LINUX_CONTAINER"
  compute_type        = "BUILD_GENERAL1_MEDIUM"
  image               = "aws/codebuild/docker:18.09.0"
  privileged_mode     = true
  buildspec           = "configuration/buildspec.yml"
  cache_type          = "S3"
  cache_location      = "${aws_s3_bucket.artifact.id}/codebuild"
  encryption_key      = ""
  build_timeout       = 10
  iam_path            = "/service-role/"
  description         = "This is example"

  enabled_ecr_access    = true
  ecr_access_policy_arn = "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryPowerUser"

  tags = {
    Environment = "prod"
  }
}

Examples

Requirements

Name Version
terraform >= 0.12

Providers

Name Version
aws n/a

Inputs

Name Description Type Default Required
name The projects name. string n/a yes
artifact_bucket_arn The S3 Bucket ARN of artifacts. string "arn:aws:s3:::*" no
build_timeout How long in minutes to wait until timing out any related build that does not get marked as completed. string 60 no
buildspec The build spec declaration to use for this build project's related builds. string "" no
cache_location The location where the AWS CodeBuild project stores cached resources. string "" no
cache_type The type of storage that will be used for the AWS CodeBuild project cache. string "NO_CACHE" no
compute_type Information about the compute resources the build project will use. string "BUILD_GENERAL1_SMALL" no
description The description of the all resources. string "Managed by Terraform" no
ecr_access_policy_arn The ARN specifying the IAM Role for ECR access. string "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryPowerUser" no
enabled_ecr_access If set to true, enables access to ECR. bool true no
encryption_key The KMS CMK to be used for encrypting the build project's build output artifacts. string "" no
environment_type The type of build environment to use for related builds. string "LINUX_CONTAINER" no
iam_path Path in which to create the IAM Role and the IAM Policy. string "/" no
image The image identifier of the Docker image to use for this build project. string "aws/codebuild/ubuntu-base:14.04" no
privileged_mode If set to true, enables running the Docker daemon inside a Docker container. bool true no
tags A mapping of tags to assign to all resources. map(string) {} no

Outputs

Name Description
codebuild_project_arn The ARN of the CodeBuild project.
codebuild_project_id The name (if imported via name) or ARN (if created via Terraform or imported via ARN) of the CodeBuild project.
iam_policy_arn The ARN assigned by AWS to this IAM Policy.
iam_policy_description The description of the IAM Policy.
iam_policy_document The policy document of the IAM Policy.
iam_policy_id The IAM Policy's ID.
iam_policy_name The name of the IAM Policy.
iam_policy_path The path of the IAM Policy.
iam_role_arn The Amazon Resource Name (ARN) specifying the IAM Role.
iam_role_create_date The creation date of the IAM Role.
iam_role_description The description of the IAM Role.
iam_role_name The name of the IAM Role.
iam_role_unique_id The stable and unique string identifying the IAM Role.

Development

Development Requirements

Configure environment variables

export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
export AWS_DEFAULT_REGION=ap-northeast-1

Installation

git clone [email protected]:tmknom/terraform-aws-codebuild.git
cd terraform-aws-codebuild
make install

Makefile targets

apply-complete                 Run terraform apply examples/complete
apply-minimal                  Run terraform apply examples/minimal
bump-version                   Bump version (Required argument 'VERSION')
check-format                   Check format code
clean                          Clean .terraform
destroy-complete               Run terraform destroy examples/complete
destroy-minimal                Run terraform destroy examples/minimal
diff                           Word diff
docs                           Generate docs
format                         Format code
help                           Show help
install                        Install requirements
lint                           Lint code
plan-complete                  Run terraform plan examples/complete
plan-minimal                   Run terraform plan examples/minimal
release                        Release GitHub and Terraform Module Registry
upgrade                        Upgrade makefile

Releasing new versions

Bump VERSION file, and run make release.

Terraform Module Registry

License

Apache 2 Licensed. See LICENSE for full details.

terraform-aws-codebuild's People

Contributors

tmknom 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.