File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -570,6 +570,14 @@ resource "aws_cloudfront_distribution" "default" {
570570 origin_keepalive_timeout = lookup (origin. value . custom_origin_config , " origin_keepalive_timeout" , 60 )
571571 origin_read_timeout = lookup (origin. value . custom_origin_config , " origin_read_timeout" , 60 )
572572 }
573+
574+ dynamic "origin_shield" {
575+ for_each = origin. value . origin_shield != null ? [origin . value . origin_shield ] : []
576+ content {
577+ enabled = origin_shield. value . enabled
578+ origin_shield_region = origin_shield. value . region
579+ }
580+ }
573581 }
574582 }
575583
@@ -589,6 +597,14 @@ resource "aws_cloudfront_distribution" "default" {
589597 origin_access_identity = local. origin_access_identity_enabled && try (length (origin. value . s3_origin_config . origin_access_identity ), 0 ) > 0 ? origin. value . s3_origin_config . origin_access_identity : local. origin_access_identity_enabled ? local. cf_access . path : " "
590598 }
591599 }
600+
601+ dynamic "origin_shield" {
602+ for_each = origin. value . origin_shield != null ? [origin . value . origin_shield ] : []
603+ content {
604+ enabled = origin_shield. value . enabled
605+ origin_shield_region = origin_shield. value . region
606+ }
607+ }
592608 }
593609 }
594610
Original file line number Diff line number Diff line change @@ -464,6 +464,10 @@ variable "custom_origins" {
464464 origin_keepalive_timeout = number
465465 origin_read_timeout = number
466466 })
467+ origin_shield = optional (object ({
468+ enabled = optional (bool , false )
469+ region = optional (string , null )
470+ }), null )
467471 }))
468472 default = []
469473 description = <<- EOT
@@ -482,6 +486,10 @@ variable "s3_origins" {
482486 s3_origin_config = object ({
483487 origin_access_identity = string
484488 })
489+ origin_shield = optional (object ({
490+ enabled = optional (bool , false )
491+ region = optional (string , null )
492+ }), null )
485493 }))
486494 default = []
487495 description = <<- EOT
You can’t perform that action at this time.
0 commit comments