Tmknom - Terraform-Aws-Codebuild - Terraform Module Which Creates CodeBuild Resources On AWS
Tmknom - Terraform-Aws-Codebuild - Terraform Module Which Creates CodeBuild Resources On AWS
Apache-2.0 License
5
stars
9
forks
Star
Watch
master
tmknom
Merge pull request #20 from tmknom/add-config-for-githu… … on May 3, 2020
66
View code
README.md
terraform-aws-codebuild
Terraform passing
Markdown passing
YAML passing
JSON passing
tag v1.2.0
license Apache-2.0
Description
Provision CodeBuild_Projects and
CodeBuild Service Role.
Support CodePipeline
Usage
Minimal
https://github.com/tmknom/terraform-aws-codebuild 1/8
4/13/22, 12:03 PM tmknom/terraform-aws-codebuild: Terraform module which creates CodeBuild resources on AWS.
module "codebuild" {
source = "git::https://github.com/tmknom/terraform-aws-codebuild.git?ref=tags/2.0.
name = "example"
Complete
module "codebuild" {
source = "git::https://github.com/tmknom/terraform-aws-codebuild.git?ref=tags/2.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
buildsp
buildspec = "configuration/buildspec.yml
buildsp "
cache_type = "S3"
cache_location = "${aws_s3_bucket.artifact.id}/codebuild"
encryption_key = ""
build_timeout = 10
iam_path = "/service-role/"
enabled_ecr_access = true
ecr_access_policy_arn = "arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryPowerUs
tags = {
Environment = "prod"
Examples
Minimal
Complete
Requirements
https://github.com/tmknom/terraform-aws-codebuild 2/8
4/13/22, 12:03 PM tmknom/terraform-aws-codebuild: Terraform module which creates CodeBuild resources on AWS.
Name Version
Providers
Name Version
aws n/a
Inputs
The projects
name string n/a
name.
The S3
artifact_bucket_arn Bucket ARN string "arn:aws:s3:::*"
of artifacts.
How long in
minutes to
wait until
timing out
build_timeout any related string 60
build that
does not get
marked as
completed.
The build
spec
declaration
to use for
buildsp
buildspec string ""
this build
project's
related
builds.
https://github.com/tmknom/terraform-aws-codebuild 3/8
4/13/22, 12:03 PM tmknom/terraform-aws-codebuild: Terraform module which creates CodeBuild resources on AWS.
The location
where the
AWS
CodeBuild
cache_location string ""
project
stores
cached
resources.
The type of
storage that
will be used
cache_type for the AWS string "NO_CACHE"
CodeBuild
project
cache.
Information
about the
compute
compute_type resources string "BUILD_GENERAL1_SMALL"
the build
project will
use.
The
description
description string "Managed by Terraform"
of the all
resources.
The ARN
specifying
ecr_access_policy_arn the IAM string "arn:aws:iam::aws:policy/Ama
Role for ECR
access.
If set to true,
enables
enabled_ecr_access bool true
access to
ECR.
https://github.com/tmknom/terraform-aws-codebuild 4/8
4/13/22, 12:03 PM tmknom/terraform-aws-codebuild: Terraform module which creates CodeBuild resources on AWS.
The KMS
CMK to be
used for
encrypting
encryption_key string ""
the build
project's
build output
artifacts.
The type of
build
environment
environment_type string "LINUX_CONTAINER"
to use for
related
builds.
Path in
which to
create the
iam_path string "/"
IAM Role
and the IAM
Policy.
The image
identifier of
the Docker
image image to string "aws/codebuild/ubuntu-base:1
use for this
build
project.
If set to true,
enables
running the
Docker
privileged_mode bool true
daemon
inside a
Docker
container.
https://github.com/tmknom/terraform-aws-codebuild 5/8
4/13/22, 12:03 PM tmknom/terraform-aws-codebuild: Terraform module which creates CodeBuild resources on AWS.
A mapping
of tags to
tags map(string) {}
assign to all
resources.
Outputs
Name Description
The name (if imported via name) or ARN (if created via
codebuild_project_id
Terraform or imported via ARN) of the CodeBuild project.
iam_role_arn The Amazon Resource Name (ARN) specifying the IAM Role.
iam_role_unique_id The stable and unique string identifying the IAM Role.
Development
Development Requirements
Docker
https://github.com/tmknom/terraform-aws-codebuild 6/8
4/13/22, 12:03 PM tmknom/terraform-aws-codebuild: Terraform module which creates CodeBuild resources on AWS.
export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
export AWS_DEFAULT_REGION=ap-northeast-1
Installation
cd terraform-aws-codebuild
make install
Makefile targets
License
https://github.com/tmknom/terraform-aws-codebuild 7/8
4/13/22, 12:03 PM tmknom/terraform-aws-codebuild: Terraform module which creates CodeBuild resources on AWS.
Releases
3
tags
Packages
No packages published
Languages
HCL 91.3%
Makefile 8.7%
https://github.com/tmknom/terraform-aws-codebuild 8/8