Yuki Takei 3 лет назад
Родитель
Сommit
d642e3b146
1 измененных файлов с 2 добавлено и 29 удалено
  1. 2 29
      packages/app/docker/codebuild/main.tf

+ 2 - 29
packages/app/docker/codebuild/main.tf

@@ -14,32 +14,6 @@ provider "aws" {
   region  = "ap-northeast-1"
 }
 
-resource "aws_s3_bucket" "s3_bucket" {
-  bucket = "growi-official-image-builder-cache"
-}
-
-resource "aws_s3_bucket_acl" "s3_bucket_acl" {
-  bucket = aws_s3_bucket.s3_bucket.id
-  acl    = "private"
-}
-
-resource "aws_s3_bucket_lifecycle_configuration" "s3_bucket_lifecycle" {
-  bucket = aws_s3_bucket.s3_bucket.id
-
-  rule {
-    id     = "auto-expire"
-    status = "Enabled"
-
-    expiration {
-      days = 60
-    }
-    noncurrent_version_expiration {
-      noncurrent_days = 3
-    }
-  }
-
-}
-
 resource "aws_iam_role" "iam_role" {
   name = "growi-official-image-builder"
 
@@ -163,8 +137,7 @@ resource "aws_codebuild_project" "codebuild" {
   source_version = "refs/heads/support/build-with-codebuild"
 
   cache {
-    type  = "S3"
-    location = "${aws_s3_bucket.s3_bucket.id}"
+    type  = "LOCAL"
+    modes = ["LOCAL_DOCKER_LAYER_CACHE", "LOCAL_CUSTOM_CACHE"]
   }
-
 }