Skip to content

Repository files navigation

Terraform Modules Template

Requirements

NameVersion
terraform>= 1.3
aws>= 4.24

Providers

NameVersion
aws4.24.0

Modules

NameSourceVersion
codebuild_service_roleterraform-aws-modules/iam/aws//modules/iam-assumable-role~> 5.2.0
codebuild_service_role_policyterraform-aws-modules/iam/aws//modules/iam-policy~> 5.2.0

Resources

NameType
aws_codebuild_project.thisresource
aws_caller_identity.currentdata source
aws_iam_policy_document.codebuilddata source
aws_iam_policy_document.codebuild_inline_policydata source
aws_region.currentdata source

Inputs

NameDescriptionTypeDefaultRequired
additional_iamAdditional IAM Policy Document for Codebuildlist(any)[]no
additional_policy_arnsAdditional policies to be added to the IAM role.list(string)[]no
artifactsArtifacts configuration block.
object({
type = string # Valid values are CODEPIPELINE, NO_ARTIFACTS, S3
name = optional(string)
location = optional(string)
})
{
"type": "NO_ARTIFACTS"
}
no
artifacts_bucket_nameName of the artifacts bucketstring""no
build_compute_typeCompute resources the build project will use.string"BUILD_GENERAL1_MEDIUM"no
build_imageDocker image to use for this build project.string"aws/codebuild/standard:6.0"no
build_image_pull_credentials_typeType of credentials AWS CodeBuild uses to pull images in your build.string"CODEBUILD"no
build_timeoutNumber of minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait until timing out any related build that does not get marked as completed.number60no
build_typeType of build environment to use for related builds.string"LINUX_CONTAINER"no
buildspecThe build spec declaration to use for this build project's related builds.string""no
cacheCache configuration block.
object({
type = optional(string) # Valid values: NO_CACHE, LOCAL, S3. Defaults to NO_CACHE.
modes = optional(list(string)) # Required when cache type is LOCAL
location = optional(string) # Required when cache type is S3
})
{}no
create_service_roleCreate new IAM service role and policy if true.booltrueno
descriptionShort description of the project.stringn/ayes
encryption_key_arnAWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build project's build output artifacts.stringnullno
environment_variablesEnvironment Variables for CodeBuild Project.
list(object({
name = string
value = string
type = optional(string)
}))
n/ayes
nameCodeBuild Project's name.stringn/ayes
privileged_modeWhether to enable running the Docker daemon inside a Docker container.boolfalseno
report_build_statusWhether to report the status of a build's start and finish to your source provider. This option is only valid when the source_type is BITBUCKET or GITHUB.boolfalseno
service_role_arnExisting CodeBuild service role arn.stringnullno
service_role_nameService Role Name.string""no
source_locationLocation of the source code from git or s3.string""no
source_typeType of repository that contains the source code to be built.string"CODEPIPELINE"no

Outputs

NameDescription
arnCodeBuild ARN.
idCodeBuild Id.
nameCodeBuild name.
service_role_arnCodeBuild service role ARN.

About

Terraform module for CodeBuild

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages