File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ resource "aws_cloudfront_origin_access_identity" "this" {
1717resource "aws_cloudfront_origin_access_control" "this" {
1818 for_each = local. create_origin_access_control ? var. origin_access_control : {}
1919
20- name = each. key
20+ name = try (each . value . name , null ) != null ? each . value . name : each. key
2121
2222 description = each. value [" description" ]
2323 origin_access_control_origin_type = each. value [" origin_type" ]
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ variable "create_origin_access_control" {
2525variable "origin_access_control" {
2626 description = " Map of CloudFront origin access control"
2727 type = map (object ({
28+ name = optional (string )
2829 description = string
2930 origin_type = string
3031 signing_behavior = string
You can’t perform that action at this time.
0 commit comments