/terraform-aws-codebuild-project

A Terraform module for managing a simple CodeBuild project.

Primary LanguageHCL

terraform-aws-codebuild-project

MadeLabs is for hire! MadeLabs is proud to support the open source community with these blueprints for provisioning infrastructure to help software builders get started quickly and with confidence.

We're also for hire: https://www.madelabs.io


A Terraform module for managing a simple CodeBuild project.

PlantUML model

Requirements

  • An existing GitHub connection available within the CodeBuild console. This module does not support CodeStar connections.

Providers

Name Version
aws >= 4.45.0

Modules

No modules.

Resources

Name Type
aws_codebuild_project.main resource
aws_iam_policy.codebuild_extra_policy resource
aws_iam_policy.codebuild_policy resource
aws_iam_role.codebuild_role resource
aws_iam_role_policy_attachment.codebuild_attachment resource
aws_iam_role_policy_attachment.codebuild_extra_attachment resource
aws_iam_policy_document.codebuild_assume_role_policy_document data source
aws_iam_policy_document.codebuild_policy_document data source

Inputs

Name Description Type Default Required
buildspec Location in repo of buildspec, specifiy for project specific buildspec string n/a yes
codebuild_build_timeout The number of minutes until the CodeBuild project times-out. number 10 no
codebuild_compute_type The compute type for the CodeBuild project. This module supports: BUILD_GENERAL1_SMALL, BUILD_GENERAL1_MEDIUM, or BUILD_GENERAL1_LARGE string "BUILD_GENERAL1_SMALL" no
codebuild_image Docker image to use for this build project. Valid values include Docker images provided by CodeBuild (e.g aws/codebuild/standard:2.0), Docker Hub images (e.g., hashicorp/terraform:latest), and full Docker repository URIs such as those for ECR (e.g., 137112412989.dkr.ecr.us-west-2.amazonaws.com/amazonlinux:latest). string "aws/codebuild/standard:6.0" no
codebuild_image_pull_credentials_type Type of credentials AWS CodeBuild uses to pull images in your build. Valid values: CODEBUILD, SERVICE_ROLE. When you use a cross-account or private registry image, you must use SERVICE_ROLE credentials. When you use an AWS CodeBuild curated image, you must use CodeBuild credentials. string "CODEBUILD" no
codebuild_project_description The description of the CodeBuild project. string n/a yes
codebuild_project_name The name of the CodeBuild project. string n/a yes
codebuild_service_role_arn The service role arn the codebuild will use. If not provided, a new IAM role will be created for the codebuild. string "" no
codebuild_type The environment type for the CodeBuild project. This module supports: LINUX_CONTAINER, ARM_CONTAINER, and WINDOWS_SERVER_2019_CONTAINER. string "LINUX_CONTAINER" no
enable_extra_iam_permissions Whether or not to enable the extra permissions described in extra_iam_permissions_json. bool false no
environment_variables The environment variables to create for the CodeBuild project.
list(object({
name = string,
value = string,
type = string
}))
[] no
extra_iam_permissions_json_file The JSON filename relative to the root Terraform module that contains JSON formatted IAM policy to apply to the role. string "extra-iam-permissions.json" no
github_repo_branch The branch of the repository that will trigger the pipeline. string n/a yes
github_repo_url The .git URL to the source GitHub repository. string n/a yes
permissions_boundary ARN of the policy that is used to set the permissions boundary for the role. string "" no
privileged_mode Whether to enable running the Docker daemon inside a Docker container. bool false no
vpc_access_enabled Whether or not access to a VPC is enabled. bool false no
vpc_id The ID of a VPC thie project will connect to. string "" no
vpc_security_group_ids The IDs of the security groups for the CodeBuild project. list(string)
[
""
]
no
vpc_subnets The IDs of the VPC subnets for the CodeBuild project. list(string)
[
""
]
no

Outputs

Name Description
codebuild_arn n/a
codebuild_id n/a