Skip to content

Commit

Permalink
Setting origin_access_control_id to empty string instead of null
Browse files Browse the repository at this point in the history
coderabbitai suggestions
  • Loading branch information
jjchiw committed Nov 1, 2024
1 parent b31cf7d commit ea81dad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 5 additions & 3 deletions examples/complete/custom-origins.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
locals {
additional_custom_origins_enabled = local.enabled && var.additional_custom_origins_enabled
default_custom_origin_configuration = {
domain_name = null
origin_id = null
origin_path = null
domain_name = null
origin_id = null
origin_path = null
# Example configuration with Origin Access Control for Lambda@Edge:
# origin_access_control_id = aws_cloudfront_origin_access_control.example.id
origin_access_control_id = null
custom_headers = []
custom_origin_config = {
Expand Down
4 changes: 3 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ variable "custom_origins" {
domain_name = string
origin_id = string
origin_path = string
origin_access_control_id = string
origin_access_control_id = optional(string)
custom_headers = list(object({
name = string
value = string
Expand All @@ -466,6 +466,8 @@ variable "custom_origins" {
default = []
description = <<-EOT
A list of additional custom website [origins](https://www.terraform.io/docs/providers/aws/r/cloudfront_distribution.html#origin-arguments) for this distribution.
The `origin_access_control_id` field specifies the Origin Access Control configuration to use for this origin.
This is used to configure secure access between CloudFront and the origin.
EOT
}

Expand Down

0 comments on commit ea81dad

Please sign in to comment.