From 5603c79abf8d5ec540924370edbb9759f75c7801 Mon Sep 17 00:00:00 2001 From: magreenbaum Date: Tue, 1 Jul 2025 15:55:53 -0400 Subject: [PATCH 1/3] allow specifying name for oac --- main.tf | 2 +- variables.tf | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 1e03a3b..f773d7e 100644 --- a/main.tf +++ b/main.tf @@ -17,7 +17,7 @@ resource "aws_cloudfront_origin_access_identity" "this" { resource "aws_cloudfront_origin_access_control" "this" { for_each = local.create_origin_access_control ? var.origin_access_control : {} - name = each.key + name = try(each.value.name, null) != null ? each.value.name : each.key description = each.value["description"] origin_access_control_origin_type = each.value["origin_type"] diff --git a/variables.tf b/variables.tf index 75a2c27..afeec33 100644 --- a/variables.tf +++ b/variables.tf @@ -25,6 +25,7 @@ variable "create_origin_access_control" { variable "origin_access_control" { description = "Map of CloudFront origin access control" type = map(object({ + name = optional(string) description = string origin_type = string signing_behavior = string From c89a36a45a60123f9a2e998b922ca2e802f02003 Mon Sep 17 00:00:00 2001 From: magreenbaum Date: Tue, 1 Jul 2025 19:59:37 -0400 Subject: [PATCH 2/3] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ef256f5..e9c267c 100644 --- a/README.md +++ b/README.md @@ -154,7 +154,7 @@ No modules. | [logging\_config](#input\_logging\_config) | The logging configuration that controls how logs are written to your distribution (maximum one). | `any` | `{}` | no | | [ordered\_cache\_behavior](#input\_ordered\_cache\_behavior) | An ordered list of cache behaviors resource for this distribution. List from top to bottom in order of precedence. The topmost cache behavior will have precedence 0. | `any` | `[]` | no | | [origin](#input\_origin) | One or more origins for this distribution (multiples allowed). | `any` | `null` | no | -| [origin\_access\_control](#input\_origin\_access\_control) | Map of CloudFront origin access control |
map(object({
description = string
origin_type = string
signing_behavior = string
signing_protocol = string
}))
|
{
"s3": {
"description": "",
"origin_type": "s3",
"signing_behavior": "always",
"signing_protocol": "sigv4"
}
}
| no | +| [origin\_access\_control](#input\_origin\_access\_control) | Map of CloudFront origin access control |
map(object({
name = optional(string)
description = string
origin_type = string
signing_behavior = string
signing_protocol = string
}))
|
{
"s3": {
"description": "",
"origin_type": "s3",
"signing_behavior": "always",
"signing_protocol": "sigv4"
}
}
| no | | [origin\_access\_identities](#input\_origin\_access\_identities) | Map of CloudFront origin access identities (value as a comment) | `map(string)` | `{}` | no | | [origin\_group](#input\_origin\_group) | One or more origin\_group for this distribution (multiples allowed). | `any` | `{}` | no | | [price\_class](#input\_price\_class) | The price class for this distribution. One of PriceClass\_All, PriceClass\_200, PriceClass\_100 | `string` | `null` | no | From 4dc90c6c177772f42ff8267b10a4b95672778925 Mon Sep 17 00:00:00 2001 From: magreenbaum Date: Tue, 1 Jul 2025 20:14:28 -0400 Subject: [PATCH 3/3] terraform msv 1.5.7 --- README.md | 2 +- versions.tf | 2 +- wrappers/versions.tf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e9c267c..b644ea3 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ ordered_cache_behavior = [{ | Name | Version | |------|---------| -| [terraform](#requirement\_terraform) | >= 0.13.1 | +| [terraform](#requirement\_terraform) | >= 1.5.7 | | [aws](#requirement\_aws) | >= 5.83 | ## Providers diff --git a/versions.tf b/versions.tf index e6e9705..5ce9aba 100644 --- a/versions.tf +++ b/versions.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.13.1" + required_version = ">= 1.5.7" required_providers { aws = { diff --git a/wrappers/versions.tf b/wrappers/versions.tf index e6e9705..5ce9aba 100644 --- a/wrappers/versions.tf +++ b/wrappers/versions.tf @@ -1,5 +1,5 @@ terraform { - required_version = ">= 0.13.1" + required_version = ">= 1.5.7" required_providers { aws = {