terraform { required_providers { aws = { source = "hashicorp/aws" version = "~> 4.16" } } required_version = ">= 1.2.0" } provider "aws" { profile = "weseek" 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" assume_role_policy = <