Skip to content

Commit

Permalink
add origin access control id
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiio committed Dec 13, 2023
1 parent ac28f47 commit d74888a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions terraform/cloudfront.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ resource "aws_cloudfront_distribution" "main" {
}

origin {
domain_name = module.s3_public.bucket_regional_domain_name
origin_id = module.s3_public.id
domain_name = module.s3_public.bucket_regional_domain_name
origin_access_control_id = aws_cloudfront_origin_access_control.s3.id
origin_id = module.s3_public.id
}

# Static
Expand Down Expand Up @@ -139,7 +140,7 @@ resource "aws_cloudfront_origin_request_policy" "default" {
}
}

resource "aws_cloudfront_origin_access_control" "oac" {
resource "aws_cloudfront_origin_access_control" "s3" {
name = module.s3_public.id
description = ""
origin_access_control_origin_type = "s3"
Expand Down

0 comments on commit d74888a

Please sign in to comment.