---
# System prepended metadata

title: Untitled

---

### 残タスク
aws_access_keyとかをlogrotate.dで記述すればそのまま書き込みいけそう（admin権限なので）

---
対応した箇所にs3_bucketを登録する
```
module.s3_rails_log.bucket_arn


module.s3_app_assets.bucket_arn
パブリックURLのみの使用用途しかないので不要かも
```
### 編集内容一覧
#### ENV/locals.tf追記
```
# app assets s3
locals {
  app_assets_bucket_name = “app-assets-qa”
  app_assets_acl             = “public-read”
}

# rails_log s3
locals {
  rails_log_bucket_name = “rails-log-qa"
  rails_log_acl             = "private"
}

```
---
#### ENV/locals.tf編集
ASIS
```
# waf
locals {
  log_bucket_name = "waf-log-qa"
  acl             = "private"
}

```
TOBE
```
locals {
  waf_log_bucket_name = "waf-log-qa"
  waf_acl             = "private"
}
```
---
#### ENV/main.tf追記
```
module “s3_rails_log" {
  source = "../../modules/s3"

  bucket_name = local.rails_log_bucket_name
  acl         = local.rails_log_acl
  enable_delete_lifecycle = true

  project     = local.project
  environment = local.environment
}

module “s3_app_assets” {
  source = "../../modules/s3"

  bucket_name = local.app_assets_bucket_name
  acl         = local.app_assets_acl

  enable_delete_lifecycle = true

  project     = local.project
  environment = local.environment
}
```
---
#### ENV/main.tf編集
ASIS
```
module "s3_waf_log" {
  source = "../../modules/s3"

  bucket_name = local.log_bucket_name
  acl         = local.acl

  enable_delete_lifecycle = true

  project     = local.project
  environment = local.environment
}
```
TOBE
```
module "s3_waf_log" {
  source = "../../modules/s3"

  bucket_name = local.waf_log_bucket_name
  acl         = local.waf_acl

  enable_delete_lifecycle = true

  project     = local.project
  environment = local.environment
}
```
