Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .tflint.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ config {
disabled_by_default = false
format = "compact"
force = false
module = true
call_module_type = "all"
}

plugin "aws" {
enabled = true
source = "github.com/terraform-linters/tflint-ruleset-aws"
Expand Down
18 changes: 18 additions & 0 deletions terraform/website/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
bucket = var.domain
}

resource "aws_s3_bucket_logging" "bucket_logging" {
bucket = aws_s3_bucket.bucket.id

target_bucket = aws_s3_bucket.logs.id
target_prefix = "s3-access-logs/"
}

resource "aws_s3_bucket" "logs" {
bucket = "${var.domain}-logs"
}

resource "aws_s3_bucket_ownership_controls" "bucket" {
bucket = aws_s3_bucket.bucket.id
rule {
Expand Down Expand Up @@ -70,6 +81,13 @@
is_ipv6_enabled = true
price_class = "PriceClass_100"

logging_config {
include_cookies = false
bucket = "${aws_s3_bucket.logs.bucket_regional_domain_name}"

Check warning on line 86 in terraform/website/main.tf

View workflow job for this annotation

GitHub Actions / test

Interpolation-only expressions are deprecated in Terraform v0.12.14
prefix = "cloudfront/"
}


origin {
domain_name = aws_s3_bucket_website_configuration.bucket.website_endpoint
origin_id = aws_s3_bucket.bucket.bucket_regional_domain_name
Expand Down
Loading