diff --git a/.github/renovate.json b/.github/renovate.json index ae4f0aa..a780298 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -4,9 +4,9 @@ ":preserveSemverRanges" ], "labels": ["auto-update"], + "dependencyDashboardAutoclose": true, "enabledManagers": ["terraform"], "terraform": { "ignorePaths": ["**/context.tf", "examples/**"] } } - diff --git a/README.md b/README.md index d039428..6906196 100644 --- a/README.md +++ b/README.md @@ -97,43 +97,47 @@ Include this module in your existing terraform code: ```hcl module "build" { - source = "cloudposse/codebuild/aws" - # Cloud Posse recommends pinning every module to a specific version - # version = "x.x.x" - namespace = "eg" - stage = "staging" - name = "app" - - # https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html - build_image = "aws/codebuild/standard:2.0" - build_compute_type = "BUILD_GENERAL1_SMALL" - build_timeout = 60 - - # 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" - - # Optional extra environment variables - environment_variables = [{ - name = "JENKINS_URL" - value = "https://jenkins.example.com" - }, - { - name = "COMPANY_NAME" - value = "Amazon" - }, - { - name = "TIME_ZONE" - value = "Pacific/Auckland" - - }] + source = "cloudposse/codebuild/aws" + # Cloud Posse recommends pinning every module to a specific version + # version = "x.x.x" + namespace = "eg" + stage = "staging" + name = "app" + + # https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html + build_image = "aws/codebuild/standard:2.0" + build_compute_type = "BUILD_GENERAL1_SMALL" + build_timeout = 60 + + # 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" + + # Optional extra environment variables + environment_variables = [ + { + name = "JENKINS_URL" + value = "https://jenkins.example.com" + type = "PLAINTEXT" + }, + { + name = "COMPANY_NAME" + value = "Amazon" + type = "PLAINTEXT" + }, + { + name = "TIME_ZONE" + value = "Pacific/Auckland" + type = "PLAINTEXT" + } + ] } ``` @@ -226,9 +230,10 @@ Available targets: | [enabled](#input\_enabled) | Set to false to prevent the module from creating any resources | `bool` | `null` | no | | [encryption\_enabled](#input\_encryption\_enabled) | When set to 'true' the resource will have AES256 encryption enabled by default | `bool` | `false` | no | | [environment](#input\_environment) | ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT' | `string` | `null` | no | -| [environment\_variables](#input\_environment\_variables) | A list of maps, that contain the keys 'name', 'value', and 'type' to be used as additional environment variables for the build. Valid types are 'PLAINTEXT', 'PARAMETER\_STORE', or 'SECRETS\_MANAGER' |
list(object(|
{
name = string
value = string
type = string
}))
[| no | +| [environment\_variables](#input\_environment\_variables) | A list of maps, that contain the keys 'name', 'value', and 'type' to be used as additional environment variables for the build. Valid types are 'PLAINTEXT', 'PARAMETER\_STORE', or 'SECRETS\_MANAGER' |
{
"name": "NO_ADDITIONAL_BUILD_VARS",
"type": "PLAINTEXT",
"value": "TRUE"
}
]
list(object(|
{
name = string
value = string
type = string
}
))
[| no | | [extra\_permissions](#input\_extra\_permissions) | List of action strings which will be added to IAM service account permissions. | `list(any)` | `[]` | no | | [fetch\_git\_submodules](#input\_fetch\_git\_submodules) | If set to true, fetches Git submodules for the AWS CodeBuild build project. | `bool` | `false` | no | +| [file\_system\_locations](#input\_file\_system\_locations) | A set of file system locations to to mount inside the build. File system locations are documented below. | `any` | `{}` | no | | [git\_clone\_depth](#input\_git\_clone\_depth) | Truncate git history to this many commits. | `number` | `null` | no | | [github\_token](#input\_github\_token) | (Optional) GitHub auth token environment variable (`GITHUB_TOKEN`) | `string` | `""` | no | | [github\_token\_type](#input\_github\_token\_type) | Storage type of GITHUB\_TOKEN environment variable (`PARAMETER_STORE`, `PLAINTEXT`, `SECRETS_MANAGER`) | `string` | `"PARAMETER_STORE"` | no | diff --git a/docs/terraform.md b/docs/terraform.md index 212a8f9..40c0b8e 100644 --- a/docs/terraform.md +++ b/docs/terraform.md @@ -70,9 +70,10 @@ | [enabled](#input\_enabled) | Set to false to prevent the module from creating any resources | `bool` | `null` | no | | [encryption\_enabled](#input\_encryption\_enabled) | When set to 'true' the resource will have AES256 encryption enabled by default | `bool` | `false` | no | | [environment](#input\_environment) | ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT' | `string` | `null` | no | -| [environment\_variables](#input\_environment\_variables) | A list of maps, that contain the keys 'name', 'value', and 'type' to be used as additional environment variables for the build. Valid types are 'PLAINTEXT', 'PARAMETER\_STORE', or 'SECRETS\_MANAGER' |
{
"name": "NO_ADDITIONAL_BUILD_VARS",
"type": "PLAINTEXT",
"value": "TRUE"
}
]
list(object(|
{
name = string
value = string
type = string
}))
[| no | +| [environment\_variables](#input\_environment\_variables) | A list of maps, that contain the keys 'name', 'value', and 'type' to be used as additional environment variables for the build. Valid types are 'PLAINTEXT', 'PARAMETER\_STORE', or 'SECRETS\_MANAGER' |
{
"name": "NO_ADDITIONAL_BUILD_VARS",
"type": "PLAINTEXT",
"value": "TRUE"
}
]
list(object(|
{
name = string
value = string
type = string
}
))
[| no | | [extra\_permissions](#input\_extra\_permissions) | List of action strings which will be added to IAM service account permissions. | `list(any)` | `[]` | no | | [fetch\_git\_submodules](#input\_fetch\_git\_submodules) | If set to true, fetches Git submodules for the AWS CodeBuild build project. | `bool` | `false` | no | +| [file\_system\_locations](#input\_file\_system\_locations) | A set of file system locations to to mount inside the build. File system locations are documented below. | `any` | `{}` | no | | [git\_clone\_depth](#input\_git\_clone\_depth) | Truncate git history to this many commits. | `number` | `null` | no | | [github\_token](#input\_github\_token) | (Optional) GitHub auth token environment variable (`GITHUB_TOKEN`) | `string` | `""` | no | | [github\_token\_type](#input\_github\_token\_type) | Storage type of GITHUB\_TOKEN environment variable (`PARAMETER_STORE`, `PLAINTEXT`, `SECRETS_MANAGER`) | `string` | `"PARAMETER_STORE"` | no |
{
"name": "NO_ADDITIONAL_BUILD_VARS",
"type": "PLAINTEXT",
"value": "TRUE"
}
]