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" {
570
570
origin_keepalive_timeout = lookup (origin. value . custom_origin_config , " origin_keepalive_timeout" , 60 )
571
571
origin_read_timeout = lookup (origin. value . custom_origin_config , " origin_read_timeout" , 60 )
572
572
}
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
+ }
573
581
}
574
582
}
575
583
@@ -589,6 +597,14 @@ resource "aws_cloudfront_distribution" "default" {
589
597
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 : " "
590
598
}
591
599
}
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
+ }
592
608
}
593
609
}
594
610
Original file line number Diff line number Diff line change @@ -464,6 +464,10 @@ variable "custom_origins" {
464
464
origin_keepalive_timeout = number
465
465
origin_read_timeout = number
466
466
})
467
+ origin_shield = optional (object ({
468
+ enabled = optional (bool , false )
469
+ region = optional (string , null )
470
+ }), null )
467
471
}))
468
472
default = []
469
473
description = <<- EOT
@@ -482,6 +486,10 @@ variable "s3_origins" {
482
486
s3_origin_config = object ({
483
487
origin_access_identity = string
484
488
})
489
+ origin_shield = optional (object ({
490
+ enabled = optional (bool , false )
491
+ region = optional (string , null )
492
+ }), null )
485
493
}))
486
494
default = []
487
495
description = <<- EOT
You can’t perform that action at this time.
0 commit comments