From 6acd27b48e75f39aec229bf3ddf25153cbcb6988 Mon Sep 17 00:00:00 2001 From: Sarkis Varozian <42673+sarkis@users.noreply.github.com> Date: Wed, 11 Jul 2018 07:33:10 -0700 Subject: [PATCH] Use README.yaml (#18) * use README.yaml * update gitignore * use hcl for code blocks * generate README * regen README * add missing descriptions --- .gitignore | 6 +- Makefile | 4 + README.md | 236 ++++++++++++++++++++++++++++++++++++++-------- README.yaml | 112 ++++++++++++++++++++++ docs/targets.md | 9 ++ docs/terraform.md | 35 +++++++ outputs.tf | 12 ++- variables.tf | 39 ++++---- 8 files changed, 395 insertions(+), 58 deletions(-) create mode 100644 README.yaml create mode 100644 docs/targets.md create mode 100644 docs/terraform.md diff --git a/.gitignore b/.gitignore index a4190a4..3b4ed85 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,13 @@ # Compiled files *.tfstate *.tfstate.backup +.terraform.tfstate.lock.info # Module directory .terraform/ - .idea *.iml + +# Build Harness +.build-harness +build-harness/ \ No newline at end of file diff --git a/Makefile b/Makefile index b0f7470..0c4fe9c 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,10 @@ SHELL := /bin/bash +# List of targets the `readme` target should call before generating the readme +export README_DEPS ?= docs/targets.md docs/terraform.md + -include $(shell curl -sSL -o .build-harness "https://git.io/build-harness"; echo .build-harness) +## Lint terraform code lint: $(SELF) terraform:install terraform:get-modules terraform:get-plugins terraform:lint terraform:validate diff --git a/README.md b/README.md index fd0762b..cbfdd7f 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,27 @@ + + +[![Cloud Posse](https://cloudposse.com/logo-300x69.svg)](https://cloudposse.com) + +# terraform-aws-codebuild [![Build Status](https://travis-ci.org/cloudposse/terraform-aws-codebuild.svg?branch=master)](https://travis-ci.org/cloudposse/terraform-aws-codebuild) [![Latest Release](https://img.shields.io/github/release/cloudposse/terraform-aws-codebuild.svg)](https://github.com/cloudposse/terraform-aws-codebuild/releases) [![Slack Community](https://slack.cloudposse.com/badge.svg)](https://slack.cloudposse.com) + + +Terraform module to create AWS CodeBuild project for AWS CodePipeline. + + +--- + +This project is part of our comprehensive ["SweetOps"](https://docs.cloudposse.com) approach towards DevOps. + + +It's 100% Open Source and licensed under the [APACHE2](LICENSE). + + -# terraform-aws-codebuild [![Build Status](https://travis-ci.org/cloudposse/terraform-aws-codebuild.svg)](https://travis-ci.org/cloudposse/terraform-aws-codebuild) -Terraform module to create AWS CodeBuild project for AWS CodePipeline ## Usage -Include this repository as a module in your existing terraform code: +Include this module in your existing terraform code: ```hcl module "build" { @@ -13,16 +29,16 @@ module "build" { namespace = "general" name = "ci" stage = "staging" - + # https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html build_image = "aws/codebuild/docker:1.12.1" build_compute_type = "BUILD_GENERAL1_SMALL" - + # 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" @@ -46,10 +62,10 @@ module "build" { } ``` -## To hide warnings about unset versions in providers -Add this in your .tf files +### To hide warnings about unset versions in providers -``` +Add this to your .tf files +```hcl provider "random" { version = "~> 1.0" } @@ -59,39 +75,185 @@ provider "null" { } ``` -## Input -| Name | Default | Description | -|:----------------------|:----------------------------:|:-----------------------------------------------------------------------------------------------------------------------------------------------------| -| namespace | global | Namespace | -| stage | default | Stage | -| name | codebuild | Name | -| build_image | aws/codebuild/docker:1.12.1 | Docker image for build environment, _e.g._ `aws/codebuild/docker:1.12.1` or `aws/codebuild/eb-nodejs-6.10.0-amazonlinux-64:4.0.0` (use `aws codebuild list-curated-environment-images` to get full list) | -| build_compute_type | BUILD_GENERAL1_SMALL | `CodeBuild` instance size. Possible values are: ```BUILD_GENERAL1_SMALL``` ```BUILD_GENERAL1_MEDIUM``` ```BUILD_GENERAL1_LARGE``` | -| buildspec | "" | (Optional) `buildspec` declaration to use for building the project | -| privileged_mode | "" | (Optional) If set to true, enables running the Docker daemon inside a Docker container on the `CodeBuild` instance. Used when building Docker images | -| aws_region | "" | (Optional) AWS Region, _e.g._ `us-east-1`. Used as `CodeBuild` ENV variable when building Docker images | -| aws_account_id | "" | (Optional) AWS Account ID. Used as `CodeBuild` ENV variable when building Docker images | -| image_repo_name | "UNSET" | (Optional) ECR repository name to store the Docker image built by this module. Used as `CodeBuild` ENV variable when building Docker images | -| image_tag | "latest" | (Optional) Docker image tag in the ECR repository, _e.g._ `latest`. Used as `CodeBuild` ENV variable when building Docker images | -| github_token | "" | (Optional) GitHub auth token environment variable (`GITHUB_TOKEN`) | -| cache_enabled | "true" | (Optional) Creates an S3 bucket, with permissions which allow [CodeBuild to store cache objects](https://aws.amazon.com/blogs/devops/how-to-enable-caching-for-aws-codebuild/) | -| cache_expiration_days | "7" | (Optional) Sets S3 policy to expire objects after X days. | -| cache_bucket_suffix_enabled | "true" | (Optional) Generates an optional 13 character bucket suffix, to help ensure that the bucket will be globally unique | -| environment_variables | [] | (Optional) A list of maps that contain both "name" and "value" keys for adding additional environment variables at build time | -## Output -| Name | Decription | -|:----------------------|:--------------------------| -| project_name | CodeBuild project name | -| project_id | CodeBuild project ARN | -| role_arn | IAM Role ARN | -| cache_bucket_name | Name of s3 caching bucket | +## Makefile Targets +``` +Available targets: + + help This help screen + help/all Display help for all targets + lint Lint terraform code + +``` + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|:----:|:-----:|:-----:| +| attributes | Additional attributes (e.g. `policy` or `role`) | list | `` | no | +| aws_account_id | (Optional) AWS Account ID. Used as CodeBuild ENV variable when building Docker images. For more info: http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html | string | `` | no | +| aws_region | (Optional) AWS Region, e.g. us-east-1. Used as CodeBuild ENV variable when building Docker images. For more info: http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html | string | `` | no | +| build_compute_type | Instance type of the build instance | string | `BUILD_GENERAL1_SMALL` | no | +| build_image | Docker image for build environment, e.g. 'aws/codebuild/docker:1.12.1' or 'aws/codebuild/eb-nodejs-6.10.0-amazonlinux-64:4.0.0'. For more info: http://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref.html | string | `aws/codebuild/docker:1.12.1` | no | +| buildspec | Optional buildspec declaration to use for building the project | string | `` | no | +| cache_bucket_suffix_enabled | The cache bucket generates a random 13 character string to generate a unique bucket name. If set to false it uses terraform-null-label's id value | string | `true` | no | +| cache_enabled | If cache_enabled is true, create an S3 bucket for storing codebuild cache inside | string | `true` | no | +| cache_expiration_days | How many days should the build cache be kept | string | `7` | no | +| delimiter | Delimiter to be used between `name`, `namespace`, `stage`, etc. | string | `-` | no | +| enabled | A boolean to enable/disable resource creation | string | `true` | no | +| environment_variables | A list of maps, that contain both the key 'name' and the key 'value' to be used as additional environment variables for the build. | list | `` | no | +| github_token | (Optional) GitHub auth token environment variable (`GITHUB_TOKEN`) | string | `` | no | +| image_repo_name | (Optional) ECR repository name to store the Docker image built by this module. Used as CodeBuild ENV variable when building Docker images. For more info: http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html | string | `UNSET` | no | +| image_tag | (Optional) Docker image tag in the ECR repository, e.g. 'latest'. Used as CodeBuild ENV variable when building Docker images. For more info: http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html | string | `latest` | no | +| name | Solution name, e.g. 'app' or 'jenkins' | string | `codebuild` | no | +| namespace | Namespace, which could be your organization name, e.g. 'cp' or 'cloudposse' | string | `global` | no | +| privileged_mode | (Optional) If set to true, enables running the Docker daemon inside a Docker container on the CodeBuild instance. Used when building Docker images | string | `false` | no | +| stage | Stage, e.g. 'prod', 'staging', 'dev', or 'test' | string | `default` | no | +| tags | Additional tags (e.g. `map('BusinessUnit', 'XYZ')` | map | `` | no | + +## Outputs + +| Name | Description | +|------|-------------| +| cache_bucket_name | Cache S3 bucket name | +| project_id | Project ID | +| project_name | Project name | +| role_arn | IAM Role ARN | + + + + +## Related Projects + +Check out these related projects. + +- [terraform-aws-ecs-codepipeline](https://github.com/cloudposse/terraform-aws-ecs-codepipeline) - Terraform Module for CI/CD with AWS Code Pipeline and Code Build for ECS + + + +## Help + +**Got a question?** + +File a GitHub [issue](https://github.com/cloudposse/terraform-aws-codebuild/issues), send us an [email][email] or join our [Slack Community][slack]. + +## Commerical Support + +Work directly with our team of DevOps experts via email, slack, and video conferencing. + +We provide *commercial support* for all of our [Open Source][github] projects. As a *Dedicated Support* customer, you have access to our team of subject matter experts at a fraction of the cost of a fulltime engineer. + +[![E-Mail](https://img.shields.io/badge/email-hello@cloudposse.com-blue.svg)](mailto:hello@cloudposse.com) + +- **Questions.** We'll use a Shared Slack channel between your team and ours. +- **Troubleshooting.** We'll help you triage why things aren't working. +- **Code Reviews.** We'll review your Pull Requests and provide constructive feedback. +- **Bug Fixes.** We'll rapidly work to fix any bugs in our projects. +- **Build New Terraform Modules.** We'll develop original modules to provision infrastructure. +- **Cloud Architecture.** We'll assist with your cloud strategy and design. +- **Implementation.** We'll provide hands on support to implement our reference architectures. + + +## Community Forum + +Get access to our [Open Source Community Forum][slack] on Slack. It's **FREE** to join for everyone! Our "SweetOps" community is where you get to talk with others who share a similar vision for how to rollout and manage infrastructure. This is the best place to talk shop, ask questions, solicit feedback, and work together as a community to build *sweet* infrastructure. + +## Contributing + +### Bug Reports & Feature Requests + +Please use the [issue tracker](https://github.com/cloudposse/terraform-aws-codebuild/issues) to report any bugs or file feature requests. + +### Developing + +If you are interested in being a contributor and want to get involved in developing this project or [help out](https://github.com/orgs/cloudposse/projects/3) with our other projects, we would love to hear from you! Shoot us an [email](mailto:hello@cloudposse.com). + +In general, PRs are welcome. We follow the typical "fork-and-pull" Git workflow. + + 1. **Fork** the repo on GitHub + 2. **Clone** the project to your own machine + 3. **Commit** changes to your own branch + 4. **Push** your work back up to your fork + 5. Submit a **Pull Request** so that we can review your changes + +**NOTE:** Be sure to merge the latest changes from "upstream" before making a pull request! + + +## Copyright + +Copyright © 2017-2018 [Cloud Posse, LLC](https://cloudposse.com) + + + +## License + +[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) + +See [LICENSE](LICENSE) for full details. + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + + +## Trademarks + +All other trademarks referenced herein are the property of their respective owners. + +## About + +This project is maintained and funded by [Cloud Posse, LLC][website]. Like it? Please let us know at + +[![Cloud Posse](https://cloudposse.com/logo-300x69.svg)](https://cloudposse.com) + +We're a [DevOps Professional Services][hire] company based in Los Angeles, CA. We love [Open Source Software](https://github.com/cloudposse/)! + +We offer paid support on all of our projects. + +Check out [our other projects][github], [apply for a job][jobs], or [hire us][hire] to help with your cloud strategy and implementation. + + [docs]: https://docs.cloudposse.com/ + [website]: https://cloudposse.com/ + [github]: https://github.com/cloudposse/ + [jobs]: https://cloudposse.com/jobs/ + [hire]: https://cloudposse.com/contact/ + [slack]: https://slack.cloudposse.com/ + [linkedin]: https://www.linkedin.com/company/cloudposse + [twitter]: https://twitter.com/cloudposse/ + [email]: mailto:hello@cloudposse.com + + +### Contributors + +| [![Erik Osterman][osterman_avatar]][osterman_homepage]
[Erik Osterman][osterman_homepage] | [![Igor Rodionov][goruha_avatar]][goruha_homepage]
[Igor Rodionov][goruha_homepage] | [![Andriy Knysh][aknysh_avatar]][aknysh_homepage]
[Andriy Knysh][aknysh_homepage] | [![Jamie Nelson][Jamie-BitfFlight_avatar]][Jamie-BitfFlight_homepage]
[Jamie Nelson][Jamie-BitfFlight_homepage] | [![Sarkis Varozian][sarkis_avatar]][sarkis_homepage]
[Sarkis Varozian][sarkis_homepage] | +|---|---|---|---|---| + [osterman_homepage]: https://github.com/osterman + [osterman_avatar]: https://github.com/osterman.png?size=150 + [goruha_homepage]: https://github.com/goruha + [goruha_avatar]: https://github.com/goruha.png?size=150 + [aknysh_homepage]: https://github.com/aknysh + [aknysh_avatar]: https://github.com/aknysh.png?size=150 + [Jamie-BitfFlight_homepage]: https://github.com/Jamie-BitfFlight + [Jamie-BitfFlight_avatar]: https://github.com/Jamie-BitfFlight.png?size=150 + [sarkis_homepage]: https://github.com/sarkis + [sarkis_avatar]: https://github.com/sarkis.png?size=150 -## License -Apache 2 License. See [`LICENSE`](LICENSE) for full details. diff --git a/README.yaml b/README.yaml new file mode 100644 index 0000000..f591dcc --- /dev/null +++ b/README.yaml @@ -0,0 +1,112 @@ +--- +# +# This is the canonical configuration for the `README.md` +# Run `make readme` to rebuild the `README.md` +# + +# Name of this project +name: terraform-aws-codebuild + +# Logo for this project +#logo: docs/logo.png + +# License of this project +license: "APACHE2" + +# Canonical GitHub repo +github_repo: cloudposse/terraform-aws-codebuild + +# Badges to display +badges: + - name: "Build Status" + image: "https://travis-ci.org/cloudposse/terraform-aws-codebuild.svg?branch=master" + url: "https://travis-ci.org/cloudposse/terraform-aws-codebuild" + - name: "Latest Release" + image: "https://img.shields.io/github/release/cloudposse/terraform-aws-codebuild.svg" + url: "https://github.com/cloudposse/terraform-aws-codebuild/releases" + - name: "Slack Community" + image: "https://slack.cloudposse.com/badge.svg" + url: "https://slack.cloudposse.com" + +related: + - name: "terraform-aws-ecs-codepipeline" + description: "Terraform Module for CI/CD with AWS Code Pipeline and Code Build for ECS" + url: "https://github.com/cloudposse/terraform-aws-ecs-codepipeline" + +# Short description of this project +description: |- + Terraform module to create AWS CodeBuild project for AWS CodePipeline. + +# How to use this project +usage: |- + Include this module in your existing terraform code: + + ```hcl + module "build" { + source = "git::https://github.com/cloudposse/terraform-aws-codebuild.git?ref=master" + namespace = "general" + name = "ci" + stage = "staging" + + # https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html + build_image = "aws/codebuild/docker:1.12.1" + build_compute_type = "BUILD_GENERAL1_SMALL" + + # 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" + + }] + } + ``` + + ### To hide warnings about unset versions in providers + + Add this to your .tf files + ```hcl + provider "random" { + version = "~> 1.0" + } + + provider "null" { + version = "~> 1.0" + } + ``` + +# Other files to include in this README from the project folder +include: + - "docs/targets.md" + - "docs/terraform.md" + +# Contributors to this project +contributors: + - name: "Erik Osterman" + github: "osterman" + - name: "Igor Rodionov" + github: "goruha" + - name: "Andriy Knysh" + github: "aknysh" + - name: "Jamie Nelson" + github: "Jamie-BitfFlight" + - name: "Sarkis Varozian" + github: "sarkis" \ No newline at end of file diff --git a/docs/targets.md b/docs/targets.md new file mode 100644 index 0000000..09c39cd --- /dev/null +++ b/docs/targets.md @@ -0,0 +1,9 @@ +## Makefile Targets +``` +Available targets: + + help This help screen + help/all Display help for all targets + lint Lint terraform code + +``` diff --git a/docs/terraform.md b/docs/terraform.md new file mode 100644 index 0000000..25400fe --- /dev/null +++ b/docs/terraform.md @@ -0,0 +1,35 @@ + +## Inputs + +| Name | Description | Type | Default | Required | +|------|-------------|:----:|:-----:|:-----:| +| attributes | Additional attributes (e.g. `policy` or `role`) | list | `` | no | +| aws_account_id | (Optional) AWS Account ID. Used as CodeBuild ENV variable when building Docker images. For more info: http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html | string | `` | no | +| aws_region | (Optional) AWS Region, e.g. us-east-1. Used as CodeBuild ENV variable when building Docker images. For more info: http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html | string | `` | no | +| build_compute_type | Instance type of the build instance | string | `BUILD_GENERAL1_SMALL` | no | +| build_image | Docker image for build environment, e.g. 'aws/codebuild/docker:1.12.1' or 'aws/codebuild/eb-nodejs-6.10.0-amazonlinux-64:4.0.0'. For more info: http://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref.html | string | `aws/codebuild/docker:1.12.1` | no | +| buildspec | Optional buildspec declaration to use for building the project | string | `` | no | +| cache_bucket_suffix_enabled | The cache bucket generates a random 13 character string to generate a unique bucket name. If set to false it uses terraform-null-label's id value | string | `true` | no | +| cache_enabled | If cache_enabled is true, create an S3 bucket for storing codebuild cache inside | string | `true` | no | +| cache_expiration_days | How many days should the build cache be kept | string | `7` | no | +| delimiter | Delimiter to be used between `name`, `namespace`, `stage`, etc. | string | `-` | no | +| enabled | A boolean to enable/disable resource creation | string | `true` | no | +| environment_variables | A list of maps, that contain both the key 'name' and the key 'value' to be used as additional environment variables for the build. | list | `` | no | +| github_token | (Optional) GitHub auth token environment variable (`GITHUB_TOKEN`) | string | `` | no | +| image_repo_name | (Optional) ECR repository name to store the Docker image built by this module. Used as CodeBuild ENV variable when building Docker images. For more info: http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html | string | `UNSET` | no | +| image_tag | (Optional) Docker image tag in the ECR repository, e.g. 'latest'. Used as CodeBuild ENV variable when building Docker images. For more info: http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html | string | `latest` | no | +| name | Solution name, e.g. 'app' or 'jenkins' | string | `codebuild` | no | +| namespace | Namespace, which could be your organization name, e.g. 'cp' or 'cloudposse' | string | `global` | no | +| privileged_mode | (Optional) If set to true, enables running the Docker daemon inside a Docker container on the CodeBuild instance. Used when building Docker images | string | `false` | no | +| stage | Stage, e.g. 'prod', 'staging', 'dev', or 'test' | string | `default` | no | +| tags | Additional tags (e.g. `map('BusinessUnit', 'XYZ')` | map | `` | no | + +## Outputs + +| Name | Description | +|------|-------------| +| cache_bucket_name | Cache S3 bucket name | +| project_id | Project ID | +| project_name | Project name | +| role_arn | IAM Role ARN | + diff --git a/outputs.tf b/outputs.tf index 6364cca..87fc2b8 100644 --- a/outputs.tf +++ b/outputs.tf @@ -1,15 +1,19 @@ output "project_name" { - value = "${join("", aws_codebuild_project.default.*.name)}" + description = "Project name" + value = "${join("", aws_codebuild_project.default.*.name)}" } output "project_id" { - value = "${join("", aws_codebuild_project.default.*.id)}" + description = "Project ID" + value = "${join("", aws_codebuild_project.default.*.id)}" } output "role_arn" { - value = "${join("", aws_iam_role.default.*.id)}" + description = "IAM Role ARN" + value = "${join("", aws_iam_role.default.*.id)}" } output "cache_bucket_name" { - value = "${var.enabled == "true" && var.cache_enabled == "true" ? join("", aws_s3_bucket.cache_bucket.*.bucket) : "UNSET" }" + description = "Cache S3 bucket name" + value = "${var.enabled == "true" && var.cache_enabled == "true" ? join("", aws_s3_bucket.cache_bucket.*.bucket) : "UNSET" }" } diff --git a/variables.tf b/variables.tf index 0502731..63d0796 100644 --- a/variables.tf +++ b/variables.tf @@ -1,16 +1,19 @@ variable "namespace" { - type = "string" - default = "global" + type = "string" + default = "global" + description = "Namespace, which could be your organization name, e.g. 'cp' or 'cloudposse'" } variable "stage" { - type = "string" - default = "default" + type = "string" + default = "default" + description = "Stage, e.g. 'prod', 'staging', 'dev', or 'test'" } variable "name" { - type = "string" - default = "codebuild" + type = "string" + default = "codebuild" + description = "Solution name, e.g. 'app' or 'jenkins'" } variable "environment_variables" { @@ -27,7 +30,7 @@ variable "environment_variables" { variable "enabled" { type = "string" default = "true" - description = "A boolean to enable/disable resource creation." + description = "A boolean to enable/disable resource creation" } variable "cache_enabled" { @@ -39,7 +42,7 @@ variable "cache_enabled" { variable "cache_expiration_days" { type = "string" default = "7" - description = "How many days should the build cache be kept." + description = "How many days should the build cache be kept" } variable "cache_bucket_suffix_enabled" { @@ -55,8 +58,9 @@ variable "build_image" { } variable "build_compute_type" { - type = "string" - default = "BUILD_GENERAL1_SMALL" + type = "string" + default = "BUILD_GENERAL1_SMALL" + description = "Instance type of the build instance" } variable "buildspec" { @@ -66,18 +70,21 @@ variable "buildspec" { } variable "delimiter" { - type = "string" - default = "-" + type = "string" + default = "-" + description = "Delimiter to be used between `name`, `namespace`, `stage`, etc." } variable "attributes" { - type = "list" - default = [] + type = "list" + default = [] + description = "Additional attributes (e.g. `policy` or `role`)" } variable "tags" { - type = "map" - default = {} + type = "map" + default = {} + description = "Additional tags (e.g. `map('BusinessUnit', 'XYZ')`" } variable "privileged_mode" {