codebuild.tf 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. module "codebuild" {
  2. source = "github.com/weseek/terraform-aws-codebuild"
  3. name = "growi-official-image-builder"
  4. description = "The CodeBuild Project for GROWI official docker image"
  5. artifact_type = "NO_ARTIFACTS"
  6. source_type = "GITHUB"
  7. source_location = "https://github.com/weseek/growi.git"
  8. source_version = "refs/heads/support/build-with-codebuild"
  9. git_clone_depth = 1
  10. buildspec = "packages/app/docker/codebuild/buildspec/root.yml"
  11. # https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
  12. build_image = "aws/codebuild/standard:6.0"
  13. build_compute_type = "BUILD_GENERAL1_LARGE"
  14. # These attributes are optional, used as ENV variables when building Docker images and pushing them to ECR
  15. # For more info:
  16. # http://docs.aws.amazon.com/codebuild/latest/userguide/sample-docker.html
  17. # https://www.terraform.io/docs/providers/aws/r/codebuild_project.html
  18. privileged_mode = true
  19. cache_type = "LOCAL"
  20. local_cache_modes = ["LOCAL_DOCKER_LAYER_CACHE", "LOCAL_CUSTOM_CACHE"]
  21. }