Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
rankin-tr committed Aug 20, 2024
1 parent 0b67b05 commit 480fb5f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ module "cloudfront_s3_cdn" {
s3_access_log_bucket_name = module.s3_bucket.bucket_id
s3_access_log_prefix = "logs/s3_access"

origin_access_type = "origin_access_control"

cloudfront_access_logging_enabled = true
cloudfront_access_log_prefix = "logs/cf_access"
s3_object_ownership = "BucketOwnerPreferred"
Expand All @@ -110,6 +112,7 @@ module "cloudfront_s3_cdn" {
domain_name = module.s3_bucket.bucket_regional_domain_name
origin_id = module.s3_bucket.bucket_id
origin_path = null
origin_access_control_id = null
s3_origin_config = {
origin_access_identity = null # will get translated to the origin_access_identity used by the origin created by this module.
}
Expand Down
5 changes: 5 additions & 0 deletions examples/complete/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ output "cf_identity_iam_arn" {
description = "CloudFront Origin Access Identity IAM ARN"
}

output "cf_access_control_id" {
value = module.cloudfront_s3_cdn.cf_access_control_id
description = "CloudFront Origin Access Control ID"
}

output "cf_origin_groups" {
value = module.cloudfront_s3_cdn.cf_origin_groups
description = "List of Origin Groups in the CloudFront distribution."
Expand Down
1 change: 1 addition & 0 deletions examples/complete/s3-origins.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ locals {
domain_name = null
origin_id = null
origin_path = null
origin_access_control_id = null
s3_origin_config = {
origin_access_identity = ""
}
Expand Down

0 comments on commit 480fb5f

Please sign in to comment.