Yuki Takei %!s(int64=3) %!d(string=hai) anos
pai
achega
8155961347

+ 0 - 10
packages/app/docker/codebuild/main.tf

@@ -64,16 +64,6 @@ resource "aws_iam_role_policy" "growi-official-image-builder" {
         "logs:PutLogEvents"
         "logs:PutLogEvents"
       ]
       ]
     },
     },
-    {
-      "Effect": "Allow",
-      "Action": [
-        "s3:*"
-      ],
-      "Resource": [
-        "${aws_s3_bucket.s3_bucket.arn}",
-        "${aws_s3_bucket.s3_bucket.arn}/*"
-      ]
-    },
     {
     {
       "Effect": "Allow",
       "Effect": "Allow",
       "Action": [
       "Action": [

+ 9 - 186
packages/app/docker/codebuild/terraform.tfstate

@@ -1,7 +1,7 @@
 {
 {
   "version": 4,
   "version": 4,
   "terraform_version": "1.3.7",
   "terraform_version": "1.3.7",
-  "serial": 69,
+  "serial": 77,
   "lineage": "7413839f-c67c-02f5-4933-fcb84251bb29",
   "lineage": "7413839f-c67c-02f5-4933-fcb84251bb29",
   "outputs": {},
   "outputs": {},
   "resources": [
   "resources": [
@@ -47,9 +47,12 @@
             "build_timeout": 60,
             "build_timeout": 60,
             "cache": [
             "cache": [
               {
               {
-                "location": "growi-official-image-builder-cache",
-                "modes": [],
-                "type": "S3"
+                "location": "",
+                "modes": [
+                  "LOCAL_DOCKER_LAYER_CACHE",
+                  "LOCAL_CUSTOM_CACHE"
+                ],
+                "type": "LOCAL"
               }
               }
             ],
             ],
             "concurrent_build_limit": 0,
             "concurrent_build_limit": 0,
@@ -118,8 +121,7 @@
           "sensitive_attributes": [],
           "sensitive_attributes": [],
           "private": "bnVsbA==",
           "private": "bnVsbA==",
           "dependencies": [
           "dependencies": [
-            "aws_iam_role.iam_role",
-            "aws_s3_bucket.s3_bucket"
+            "aws_iam_role.iam_role"
           ]
           ]
         }
         }
       ]
       ]
@@ -175,197 +177,18 @@
             "id": "growi-official-image-builder:terraform-20230112203526188400000001",
             "id": "growi-official-image-builder:terraform-20230112203526188400000001",
             "name": "terraform-20230112203526188400000001",
             "name": "terraform-20230112203526188400000001",
             "name_prefix": null,
             "name_prefix": null,
-            "policy": "{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Resource\": [\n        \"*\"\n      ],\n      \"Action\": [\n        \"logs:CreateLogGroup\",\n        \"logs:CreateLogStream\",\n        \"logs:PutLogEvents\"\n      ]\n    },\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"s3:*\"\n      ],\n      \"Resource\": [\n        \"arn:aws:s3:::growi-official-image-builder-cache\",\n        \"arn:aws:s3:::growi-official-image-builder-cache/*\"\n      ]\n    },\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"secretsmanager:GetResourcePolicy\",\n        \"secretsmanager:GetSecretValue\",\n        \"secretsmanager:DescribeSecret\",\n        \"secretsmanager:ListSecretVersionIds\"\n      ],\n      \"Resource\": [\n        \"arn:aws:secretsmanager:ap-northeast-1:259692501178:secret:growi/official-image-builder-9sraQN\"\n      ]\n    },\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"codebuild:StartBuild\",\n        \"codebuild:StopBuild\",\n        \"codebuild:RetryBuild\",\n        \"codebuild:CreateReportGroup\",\n        \"codebuild:CreateReport\",\n        \"codebuild:UpdateReport\",\n        \"codebuild:BatchPutTestCases\",\n        \"codebuild:BatchPutCodeCoverages\"\n      ],\n      \"Resource\": [\n        \"*\"\n      ]\n    }\n  ]\n}\n",
+            "policy": "{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Resource\": [\n        \"*\"\n      ],\n      \"Action\": [\n        \"logs:CreateLogGroup\",\n        \"logs:CreateLogStream\",\n        \"logs:PutLogEvents\"\n      ]\n    },\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"secretsmanager:GetResourcePolicy\",\n        \"secretsmanager:GetSecretValue\",\n        \"secretsmanager:DescribeSecret\",\n        \"secretsmanager:ListSecretVersionIds\"\n      ],\n      \"Resource\": [\n        \"arn:aws:secretsmanager:ap-northeast-1:259692501178:secret:growi/official-image-builder-9sraQN\"\n      ]\n    },\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": [\n        \"codebuild:StartBuild\",\n        \"codebuild:StopBuild\",\n        \"codebuild:RetryBuild\",\n        \"codebuild:CreateReportGroup\",\n        \"codebuild:CreateReport\",\n        \"codebuild:UpdateReport\",\n        \"codebuild:BatchPutTestCases\",\n        \"codebuild:BatchPutCodeCoverages\"\n      ],\n      \"Resource\": [\n        \"*\"\n      ]\n    }\n  ]\n}\n",
             "role": "growi-official-image-builder"
             "role": "growi-official-image-builder"
           },
           },
           "sensitive_attributes": [],
           "sensitive_attributes": [],
           "private": "bnVsbA==",
           "private": "bnVsbA==",
           "dependencies": [
           "dependencies": [
             "aws_iam_role.iam_role",
             "aws_iam_role.iam_role",
-            "aws_s3_bucket.s3_bucket",
             "aws_secretsmanager_secret.secret"
             "aws_secretsmanager_secret.secret"
           ]
           ]
         }
         }
       ]
       ]
     },
     },
-    {
-      "mode": "managed",
-      "type": "aws_s3_bucket",
-      "name": "s3_bucket",
-      "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
-      "instances": [
-        {
-          "schema_version": 0,
-          "attributes": {
-            "acceleration_status": "",
-            "acl": null,
-            "arn": "arn:aws:s3:::growi-official-image-builder-cache",
-            "bucket": "growi-official-image-builder-cache",
-            "bucket_domain_name": "growi-official-image-builder-cache.s3.amazonaws.com",
-            "bucket_prefix": null,
-            "bucket_regional_domain_name": "growi-official-image-builder-cache.s3.ap-northeast-1.amazonaws.com",
-            "cors_rule": [],
-            "force_destroy": false,
-            "grant": [
-              {
-                "id": "16ace6e62ff20a38d91b231ba787c479a9d92a5863a4b9434d692324b9f2d255",
-                "permissions": [
-                  "FULL_CONTROL"
-                ],
-                "type": "CanonicalUser",
-                "uri": ""
-              }
-            ],
-            "hosted_zone_id": "Z2M4EHUR26P7ZW",
-            "id": "growi-official-image-builder-cache",
-            "lifecycle_rule": [
-              {
-                "abort_incomplete_multipart_upload_days": 0,
-                "enabled": true,
-                "expiration": [
-                  {
-                    "date": "",
-                    "days": 60,
-                    "expired_object_delete_marker": false
-                  }
-                ],
-                "id": "auto-expire",
-                "noncurrent_version_expiration": [
-                  {
-                    "days": 3
-                  }
-                ],
-                "noncurrent_version_transition": [],
-                "prefix": "",
-                "tags": {},
-                "transition": []
-              }
-            ],
-            "logging": [],
-            "object_lock_configuration": [],
-            "object_lock_enabled": false,
-            "policy": "",
-            "region": "ap-northeast-1",
-            "replication_configuration": [],
-            "request_payer": "BucketOwner",
-            "server_side_encryption_configuration": [],
-            "tags": {},
-            "tags_all": {},
-            "timeouts": null,
-            "versioning": [
-              {
-                "enabled": false,
-                "mfa_delete": false
-              }
-            ],
-            "website": [],
-            "website_domain": null,
-            "website_endpoint": null
-          },
-          "sensitive_attributes": [],
-          "private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxMjAwMDAwMDAwMDAwLCJkZWxldGUiOjM2MDAwMDAwMDAwMDAsInJlYWQiOjEyMDAwMDAwMDAwMDAsInVwZGF0ZSI6MTIwMDAwMDAwMDAwMH19"
-        }
-      ]
-    },
-    {
-      "mode": "managed",
-      "type": "aws_s3_bucket_acl",
-      "name": "s3_bucket_acl",
-      "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
-      "instances": [
-        {
-          "schema_version": 0,
-          "attributes": {
-            "access_control_policy": [
-              {
-                "grant": [
-                  {
-                    "grantee": [
-                      {
-                        "display_name": "yukiws",
-                        "email_address": "",
-                        "id": "16ace6e62ff20a38d91b231ba787c479a9d92a5863a4b9434d692324b9f2d255",
-                        "type": "CanonicalUser",
-                        "uri": ""
-                      }
-                    ],
-                    "permission": "FULL_CONTROL"
-                  }
-                ],
-                "owner": [
-                  {
-                    "display_name": "yukiws",
-                    "id": "16ace6e62ff20a38d91b231ba787c479a9d92a5863a4b9434d692324b9f2d255"
-                  }
-                ]
-              }
-            ],
-            "acl": "private",
-            "bucket": "growi-official-image-builder-cache",
-            "expected_bucket_owner": "",
-            "id": "growi-official-image-builder-cache,private"
-          },
-          "sensitive_attributes": [],
-          "private": "bnVsbA==",
-          "dependencies": [
-            "aws_s3_bucket.s3_bucket"
-          ]
-        }
-      ]
-    },
-    {
-      "mode": "managed",
-      "type": "aws_s3_bucket_lifecycle_configuration",
-      "name": "s3_bucket_lifecycle",
-      "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
-      "instances": [
-        {
-          "schema_version": 0,
-          "attributes": {
-            "bucket": "growi-official-image-builder-cache",
-            "expected_bucket_owner": "",
-            "id": "growi-official-image-builder-cache",
-            "rule": [
-              {
-                "abort_incomplete_multipart_upload": [],
-                "expiration": [
-                  {
-                    "date": "",
-                    "days": 60,
-                    "expired_object_delete_marker": false
-                  }
-                ],
-                "filter": [
-                  {
-                    "and": [],
-                    "object_size_greater_than": "",
-                    "object_size_less_than": "",
-                    "prefix": "",
-                    "tag": []
-                  }
-                ],
-                "id": "auto-expire",
-                "noncurrent_version_expiration": [
-                  {
-                    "newer_noncurrent_versions": "",
-                    "noncurrent_days": 3
-                  }
-                ],
-                "noncurrent_version_transition": [],
-                "prefix": "",
-                "status": "Enabled",
-                "transition": []
-              }
-            ]
-          },
-          "sensitive_attributes": [],
-          "private": "bnVsbA==",
-          "dependencies": [
-            "aws_s3_bucket.s3_bucket"
-          ]
-        }
-      ]
-    },
     {
     {
       "mode": "managed",
       "mode": "managed",
       "type": "aws_secretsmanager_secret",
       "type": "aws_secretsmanager_secret",