Skip to content

Commit 736ce3b

Browse files
authored
feat!: Support specifying name for OAC and Terraform MSV 1.5.7 (#166)
1 parent 47911eb commit 736ce3b

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ ordered_cache_behavior = [{
106106

107107
| Name | Version |
108108
|------|---------|
109-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.1 |
109+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.5.7 |
110110
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.83 |
111111

112112
## Providers
@@ -154,7 +154,7 @@ No modules.
154154
| <a name="input_logging_config"></a> [logging\_config](#input\_logging\_config) | The logging configuration that controls how logs are written to your distribution (maximum one). | `any` | `{}` | no |
155155
| <a name="input_ordered_cache_behavior"></a> [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 |
156156
| <a name="input_origin"></a> [origin](#input\_origin) | One or more origins for this distribution (multiples allowed). | `any` | `null` | no |
157-
| <a name="input_origin_access_control"></a> [origin\_access\_control](#input\_origin\_access\_control) | Map of CloudFront origin access control | <pre>map(object({<br/> description = string<br/> origin_type = string<br/> signing_behavior = string<br/> signing_protocol = string<br/> }))</pre> | <pre>{<br/> "s3": {<br/> "description": "",<br/> "origin_type": "s3",<br/> "signing_behavior": "always",<br/> "signing_protocol": "sigv4"<br/> }<br/>}</pre> | no |
157+
| <a name="input_origin_access_control"></a> [origin\_access\_control](#input\_origin\_access\_control) | Map of CloudFront origin access control | <pre>map(object({<br/> name = optional(string)<br/> description = string<br/> origin_type = string<br/> signing_behavior = string<br/> signing_protocol = string<br/> }))</pre> | <pre>{<br/> "s3": {<br/> "description": "",<br/> "origin_type": "s3",<br/> "signing_behavior": "always",<br/> "signing_protocol": "sigv4"<br/> }<br/>}</pre> | no |
158158
| <a name="input_origin_access_identities"></a> [origin\_access\_identities](#input\_origin\_access\_identities) | Map of CloudFront origin access identities (value as a comment) | `map(string)` | `{}` | no |
159159
| <a name="input_origin_group"></a> [origin\_group](#input\_origin\_group) | One or more origin\_group for this distribution (multiples allowed). | `any` | `{}` | no |
160160
| <a name="input_price_class"></a> [price\_class](#input\_price\_class) | The price class for this distribution. One of PriceClass\_All, PriceClass\_200, PriceClass\_100 | `string` | `null` | no |

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ resource "aws_cloudfront_origin_access_identity" "this" {
1717
resource "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"]

variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ variable "create_origin_access_control" {
2525
variable "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

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = ">= 0.13.1"
2+
required_version = ">= 1.5.7"
33

44
required_providers {
55
aws = {

wrappers/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = ">= 0.13.1"
2+
required_version = ">= 1.5.7"
33

44
required_providers {
55
aws = {

0 commit comments

Comments
 (0)