From 43b57460ed0dc06e212eb059c121b8bd4803d3ac Mon Sep 17 00:00:00 2001 From: Kevin Mahoney Date: Fri, 26 Aug 2022 16:43:33 -0400 Subject: [PATCH] enable http3 (#90) * enable http3 * Auto Format Co-authored-by: cloudpossebot <11232728+cloudpossebot@users.noreply.github.com> --- .github/auto-release.yml | 1 - .github/renovate.json | 2 +- README.md | 8 +++++--- docs/terraform.md | 5 +++-- examples/complete/fixtures.us-east-2.tfvars | 2 ++ examples/complete/variables.tf | 6 ++++++ examples/complete/versions.tf | 2 +- main.tf | 3 +-- variables.tf | 5 +++++ versions.tf | 2 +- 10 files changed, 25 insertions(+), 11 deletions(-) diff --git a/.github/auto-release.yml b/.github/auto-release.yml index b45efb7..17cd39c 100644 --- a/.github/auto-release.yml +++ b/.github/auto-release.yml @@ -17,7 +17,6 @@ version-resolver: - 'bugfix' - 'bug' - 'hotfix' - - 'no-release' default: 'minor' categories: diff --git a/.github/renovate.json b/.github/renovate.json index ae4f0aa..a780298 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -4,9 +4,9 @@ ":preserveSemverRanges" ], "labels": ["auto-update"], + "dependencyDashboardAutoclose": true, "enabledManagers": ["terraform"], "terraform": { "ignorePaths": ["**/context.tf", "examples/**"] } } - diff --git a/README.md b/README.md index 264fbc9..bfa7cce 100644 --- a/README.md +++ b/README.md @@ -148,14 +148,14 @@ Available targets: | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 0.13.0 | -| [aws](#requirement\_aws) | >= 2.0, < 4 | +| [aws](#requirement\_aws) | >= 4.27.0 | | [local](#requirement\_local) | >= 1.2 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 2.0, < 4 | +| [aws](#provider\_aws) | >= 4.27.0 | ## Modules @@ -205,6 +205,7 @@ Available targets: | [function\_association](#input\_function\_association) | A config block that triggers a CloudFront function with specific actions.
See the [aws\_cloudfront\_distribution](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_distribution#function-association)
documentation for more information. |
list(object({
event_type = string
function_arn = string
}))
| `[]` | no | | [geo\_restriction\_locations](#input\_geo\_restriction\_locations) | List of country codes for which CloudFront either to distribute content (whitelist) or not distribute your content (blacklist) | `list(string)` | `[]` | no | | [geo\_restriction\_type](#input\_geo\_restriction\_type) | Method that use to restrict distribution of your content by country: `none`, `whitelist`, or `blacklist` | `string` | `"none"` | no | +| [http\_version](#input\_http\_version) | The maximum HTTP version to support on the distribution. Allowed values are http1.1, http2, http2and3 and http3. | `string` | `"http2"` | no | | [id\_length\_limit](#input\_id\_length\_limit) | Limit `id` to this many characters (minimum 6).
Set to `0` for unlimited length.
Set to `null` for keep the existing setting, which defaults to `0`.
Does not affect `id_full`. | `number` | `null` | no | | [is\_ipv6\_enabled](#input\_is\_ipv6\_enabled) | State of CloudFront IPv6 | `bool` | `true` | no | | [label\_key\_case](#input\_label\_key\_case) | Controls the letter case of the `tags` keys (label names) for tags generated by this module.
Does not affect keys of tags passed in via the `tags` input.
Possible values: `lower`, `title`, `upper`.
Default value: `title`. | `string` | `null` | no | @@ -428,7 +429,7 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply [![README Footer][readme_footer_img]][readme_footer_link] [![Beacon][beacon]][website] - + [logo]: https://cloudposse.com/logo-300x69.svg [docs]: https://cpco.io/docs?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-cloudfront-cdn&utm_content=docs [website]: https://cpco.io/homepage?utm_source=github&utm_medium=readme&utm_campaign=cloudposse/terraform-aws-cloudfront-cdn&utm_content=website @@ -459,3 +460,4 @@ Check out [our other projects][github], [follow us on twitter][twitter], [apply [share_googleplus]: https://plus.google.com/share?url=https://github.com/cloudposse/terraform-aws-cloudfront-cdn [share_email]: mailto:?subject=terraform-aws-cloudfront-cdn&body=https://github.com/cloudposse/terraform-aws-cloudfront-cdn [beacon]: https://ga-beacon.cloudposse.com/UA-76589703-4/cloudposse/terraform-aws-cloudfront-cdn?pixel&cs=github&cm=readme&an=terraform-aws-cloudfront-cdn + diff --git a/docs/terraform.md b/docs/terraform.md index 8e68052..d42bcd9 100644 --- a/docs/terraform.md +++ b/docs/terraform.md @@ -4,14 +4,14 @@ | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 0.13.0 | -| [aws](#requirement\_aws) | >= 2.0, < 4 | +| [aws](#requirement\_aws) | >= 4.27.0 | | [local](#requirement\_local) | >= 1.2 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 2.0, < 4 | +| [aws](#provider\_aws) | >= 4.27.0 | ## Modules @@ -61,6 +61,7 @@ | [function\_association](#input\_function\_association) | A config block that triggers a CloudFront function with specific actions.
See the [aws\_cloudfront\_distribution](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_distribution#function-association)
documentation for more information. |
list(object({
event_type = string
function_arn = string
}))
| `[]` | no | | [geo\_restriction\_locations](#input\_geo\_restriction\_locations) | List of country codes for which CloudFront either to distribute content (whitelist) or not distribute your content (blacklist) | `list(string)` | `[]` | no | | [geo\_restriction\_type](#input\_geo\_restriction\_type) | Method that use to restrict distribution of your content by country: `none`, `whitelist`, or `blacklist` | `string` | `"none"` | no | +| [http\_version](#input\_http\_version) | The maximum HTTP version to support on the distribution. Allowed values are http1.1, http2, http2and3 and http3. | `string` | `"http2"` | no | | [id\_length\_limit](#input\_id\_length\_limit) | Limit `id` to this many characters (minimum 6).
Set to `0` for unlimited length.
Set to `null` for keep the existing setting, which defaults to `0`.
Does not affect `id_full`. | `number` | `null` | no | | [is\_ipv6\_enabled](#input\_is\_ipv6\_enabled) | State of CloudFront IPv6 | `bool` | `true` | no | | [label\_key\_case](#input\_label\_key\_case) | Controls the letter case of the `tags` keys (label names) for tags generated by this module.
Does not affect keys of tags passed in via the `tags` input.
Possible values: `lower`, `title`, `upper`.
Default value: `title`. | `string` | `null` | no | diff --git a/examples/complete/fixtures.us-east-2.tfvars b/examples/complete/fixtures.us-east-2.tfvars index 66dc93c..f741248 100644 --- a/examples/complete/fixtures.us-east-2.tfvars +++ b/examples/complete/fixtures.us-east-2.tfvars @@ -15,3 +15,5 @@ aliases = [] origin_domain_name = "example.com" parent_zone_name = "testing.cloudposse.co" + +http_version = "http2and3" diff --git a/examples/complete/variables.tf b/examples/complete/variables.tf index 76db851..0b4a5b6 100644 --- a/examples/complete/variables.tf +++ b/examples/complete/variables.tf @@ -266,3 +266,9 @@ variable "trusted_signers" { default = [] description = "List of AWS account IDs (or self) that you want to allow to create signed URLs for private content" } + +variable "http_version" { + type = string + default = "http2" + description = "The maximum HTTP version to support on the distribution. Allowed values are http1.1, http2, http2and3 and http3." +} diff --git a/examples/complete/versions.tf b/examples/complete/versions.tf index 2300bcd..b29221a 100644 --- a/examples/complete/versions.tf +++ b/examples/complete/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 2.0" + version = ">= 4.27.0" } local = { source = "hashicorp/local" diff --git a/main.tf b/main.tf index d6d5ab6..ddd13b3 100644 --- a/main.tf +++ b/main.tf @@ -34,6 +34,7 @@ resource "aws_cloudfront_distribution" "default" { enabled = var.distribution_enabled is_ipv6_enabled = var.is_ipv6_enabled + http_version = var.http_version comment = var.comment default_root_object = var.default_root_object price_class = var.price_class @@ -88,8 +89,6 @@ resource "aws_cloudfront_distribution" "default" { value = custom_header.value.value } } - - } dynamic "origin" { diff --git a/variables.tf b/variables.tf index 5361aa7..5201f62 100644 --- a/variables.tf +++ b/variables.tf @@ -401,3 +401,8 @@ variable "realtime_log_config_arn" { description = "The ARN of the real-time log configuration that is attached to this cache behavior" } +variable "http_version" { + type = string + default = "http2" + description = "The maximum HTTP version to support on the distribution. Allowed values are http1.1, http2, http2and3 and http3." +} diff --git a/versions.tf b/versions.tf index c01bc2f..b29221a 100644 --- a/versions.tf +++ b/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 2.0, < 4" + version = ">= 4.27.0" } local = { source = "hashicorp/local"