Skip to content

Commit f5996e2

Browse files
committed
feat(origin-request-polipcy): support aws v6
1 parent 5a8eddc commit f5996e2

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

modules/origin-request-policy/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ This module creates following resources.
99

1010
| Name | Version |
1111
|------|---------|
12-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.6 |
13-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.19 |
12+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.12 |
13+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.20 |
1414

1515
## Providers
1616

1717
| Name | Version |
1818
|------|---------|
19-
| <a name="provider_aws"></a> [aws](#provider\_aws) | 5.28.0 |
19+
| <a name="provider_aws"></a> [aws](#provider\_aws) | 6.23.0 |
2020

2121
## Modules
2222

@@ -34,14 +34,15 @@ No modules.
3434
|------|-------------|------|---------|:--------:|
3535
| <a name="input_name"></a> [name](#input\_name) | (Required) A unique name to identify the CloudFront Origin Request Policy. | `string` | n/a | yes |
3636
| <a name="input_description"></a> [description](#input\_description) | (Optional) The description of the origin request policy. | `string` | `"Managed by Terraform."` | no |
37-
| <a name="input_forwarding_cookies"></a> [forwarding\_cookies](#input\_forwarding\_cookies) | (Optional) A configuration for specifying which cookies in viewer requests to be forwarded in the origin requests. `forwarding_cookies` as defined below.<br> (Required) `behavior` - Determine whether any cookies in viewer requests are forwarded in the origin requests. Valid values are `NONE`, `WHITELIST`, `ALL`, `BLACKLIST`. Defaults to `NONE`.<br> (Optional) `items` - A list of cookie names. It only takes effect when `behavior` are `WHITELIST`, `BLACKLIST`. | <pre>object({<br> behavior = optional(string, "NONE")<br> items = optional(set(string), [])<br> })</pre> | `{}` | no |
38-
| <a name="input_forwarding_headers"></a> [forwarding\_headers](#input\_forwarding\_headers) | (Optional) A configuration for specifying which headers in viewer requests to be forwarded in the origin requests. `forwarding_headers` as defined below.<br> (Required) `behavior` - Determine whether any headers in viewer requests are forwarded in the origin requests. Valid values are `NONE`, `WHITELIST`, `BLACKLIST`, `ALL_VIEWER` and `ALL_VIEWER_AND_CLOUDFRONT_WHITELIST`. Defaults to `NONE`.<br> (Optional) `items` - A list of header names. It only takes effect when `behavior` are `WHITELIST`, `BLACKLIST` or `ALL_VIEWER_AND_CLOUDFRONT_WHITELIST`. | <pre>object({<br> behavior = optional(string, "NONE")<br> items = optional(set(string), [])<br> })</pre> | `{}` | no |
39-
| <a name="input_forwarding_query_strings"></a> [forwarding\_query\_strings](#input\_forwarding\_query\_strings) | (Optional) A configuration for specifying which query strings in viewer requests to be forwarded in the origin requests. `forwarding_query_strings` as defined below.<br> (Required) `behavior` - Determine whether any query strings in viewer requests are forwarded in the origin requests. Valid values are `NONE`, `WHITELIST`, `BLACKLIST`, `ALL`. Defaults to `NONE`.<br> (Optional) `items` - A list of query string names. It only takes effect when `behavior` are `WHITELIST`, `BLACKLIST`. | <pre>object({<br> behavior = optional(string, "NONE")<br> items = optional(set(string), [])<br> })</pre> | `{}` | no |
37+
| <a name="input_forwarding_cookies"></a> [forwarding\_cookies](#input\_forwarding\_cookies) | (Optional) A configuration for specifying which cookies in viewer requests to be forwarded in the origin requests. `forwarding_cookies` as defined below.<br/> (Required) `behavior` - Determine whether any cookies in viewer requests are forwarded in the origin requests. Valid values are `NONE`, `WHITELIST`, `ALL`, `BLACKLIST`. Defaults to `NONE`.<br/> (Optional) `items` - A list of cookie names. It only takes effect when `behavior` are `WHITELIST`, `BLACKLIST`. | <pre>object({<br/> behavior = optional(string, "NONE")<br/> items = optional(set(string), [])<br/> })</pre> | `{}` | no |
38+
| <a name="input_forwarding_headers"></a> [forwarding\_headers](#input\_forwarding\_headers) | (Optional) A configuration for specifying which headers in viewer requests to be forwarded in the origin requests. `forwarding_headers` as defined below.<br/> (Required) `behavior` - Determine whether any headers in viewer requests are forwarded in the origin requests. Valid values are `NONE`, `WHITELIST`, `BLACKLIST`, `ALL_VIEWER` and `ALL_VIEWER_AND_CLOUDFRONT_WHITELIST`. Defaults to `NONE`.<br/> (Optional) `items` - A list of header names. It only takes effect when `behavior` are `WHITELIST`, `BLACKLIST` or `ALL_VIEWER_AND_CLOUDFRONT_WHITELIST`. | <pre>object({<br/> behavior = optional(string, "NONE")<br/> items = optional(set(string), [])<br/> })</pre> | `{}` | no |
39+
| <a name="input_forwarding_query_strings"></a> [forwarding\_query\_strings](#input\_forwarding\_query\_strings) | (Optional) A configuration for specifying which query strings in viewer requests to be forwarded in the origin requests. `forwarding_query_strings` as defined below.<br/> (Required) `behavior` - Determine whether any query strings in viewer requests are forwarded in the origin requests. Valid values are `NONE`, `WHITELIST`, `BLACKLIST`, `ALL`. Defaults to `NONE`.<br/> (Optional) `items` - A list of query string names. It only takes effect when `behavior` are `WHITELIST`, `BLACKLIST`. | <pre>object({<br/> behavior = optional(string, "NONE")<br/> items = optional(set(string), [])<br/> })</pre> | `{}` | no |
4040

4141
## Outputs
4242

4343
| Name | Description |
4444
|------|-------------|
45+
| <a name="output_arn"></a> [arn](#output\_arn) | The ARN of the CloudFront origin request policy. |
4546
| <a name="output_description"></a> [description](#output\_description) | The description of the origin request policy. |
4647
| <a name="output_etag"></a> [etag](#output\_etag) | The current version of the origin request policy. |
4748
| <a name="output_forwarding_cookies"></a> [forwarding\_cookies](#output\_forwarding\_cookies) | A configuration for specifying which cookies to be forwarded in the origin requests. |

modules/origin-request-policy/outputs.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
output "arn" {
2+
description = "The ARN of the CloudFront origin request policy."
3+
value = aws_cloudfront_origin_request_policy.this.arn
4+
}
5+
16
output "id" {
27
description = "The identifier for the CloudFront origin request policy."
38
value = aws_cloudfront_origin_request_policy.this.id

modules/origin-request-policy/variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
variable "name" {
22
description = "(Required) A unique name to identify the CloudFront Origin Request Policy."
33
type = string
4+
nullable = false
45
}
56

67
variable "description" {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
terraform {
2-
required_version = ">= 1.6"
2+
required_version = ">= 1.12"
33

44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.19"
7+
version = ">= 6.20"
88
}
99
}
1010
}

0 commit comments

Comments
 (0)