Skip to content

Commit 8757757

Browse files
committed
build: update dependencies
1 parent 82304ef commit 8757757

File tree

3 files changed

+39
-22
lines changed

3 files changed

+39
-22
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
repos:
33
- repo: https://github.com/compilerla/conventional-pre-commit
4-
rev: v1.2.0
4+
rev: v3.2.0
55
hooks:
66
- id: conventional-pre-commit
77
stages: [commit-msg]
88
args: []
99
- repo: https://github.com/pre-commit/pre-commit-hooks
10-
rev: v4.1.0
10+
rev: v4.6.0
1111
hooks:
1212
- id: trailing-whitespace
1313
- id: end-of-file-fixer
@@ -32,25 +32,20 @@ repos:
3232
args:
3333
- -b main
3434
- repo: https://github.com/antonbabenko/pre-commit-terraform
35-
rev: v1.62.0
35+
rev: v1.89.1
3636
hooks:
3737
- id: terraform_fmt
38-
- id: terraform_tflint
3938
- id: terraform_docs
4039
args:
4140
- --hook-config=--path-to-file=README.md
4241
- --hook-config=--add-to-existing-file=true
4342
- --hook-config=--create-file-if-not-exist=true
44-
- repo: https://github.com/Checkmarx/kics
45-
rev: v1.5.4
46-
hooks:
47-
- id: kics
4843
- repo: https://github.com/sirosen/check-jsonschema
49-
rev: 0.13.0
44+
rev: 0.28.3
5045
hooks:
5146
- id: check-github-workflows
5247
- repo: https://github.com/pre-commit/mirrors-prettier
53-
rev: v2.5.1
48+
rev: v4.0.0-alpha.8
5449
hooks:
5550
- id: prettier
5651
stages: [commit]

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Please be aware that this is mainly a copy operation which means all your curren
117117

118118
| Name | Source | Version |
119119
|------|--------|---------|
120-
| <a name="module_bucket"></a> [bucket](#module\_bucket) | git::github.com/xoap-io/terraform-aws-storage-s3.git | v0.1.0 |
120+
| <a name="module_bucket"></a> [bucket](#module\_bucket) | git::github.com/xoap-io/terraform-aws-storage-s3.git | v0.1.1 |
121121
| <a name="module_this_label"></a> [this\_label](#module\_this\_label) | git::github.com/xoap-io/terraform-aws-misc-label | v0.1.0 |
122122

123123
## Resources
@@ -127,6 +127,7 @@ Please be aware that this is mainly a copy operation which means all your curren
127127
| [aws_cloudfront_cache_policy.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_cache_policy) | resource |
128128
| [aws_cloudfront_distribution.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_distribution) | resource |
129129
| [aws_cloudfront_origin_request_policy.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_origin_request_policy) | resource |
130+
| [aws_cloudfront_response_headers_policy.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudfront_response_headers_policy) | resource |
130131

131132
## Inputs
132133

main.tf

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module "this_label" {
44
attributes = ["hosting", var.site_name]
55
}
66
module "bucket" {
7-
source = "git::github.com/xoap-io/terraform-aws-storage-s3.git?ref=v0.1.0"
7+
source = "git::github.com/xoap-io/terraform-aws-storage-s3.git?ref=v0.1.1"
88
context = var.context
99
name = var.site_name
1010
website_enabled = true
@@ -49,6 +49,29 @@ resource "aws_cloudfront_origin_request_policy" "this" {
4949
}
5050
query_strings_config {
5151
query_string_behavior = "all"
52+
53+
}
54+
55+
}
56+
resource "aws_cloudfront_response_headers_policy" "this" {
57+
name = module.this_label.id
58+
59+
cors_config {
60+
access_control_allow_credentials = false
61+
62+
access_control_allow_headers {
63+
items = var.cors_allowed_headers
64+
}
65+
66+
access_control_allow_methods {
67+
items = concat(var.cors_allowed_methods, ["OPTIONS"])
68+
}
69+
70+
access_control_allow_origins {
71+
items = var.cors_allowed_origins
72+
}
73+
74+
origin_override = true
5275
}
5376
}
5477
#tfsec:ignore:AWS045
@@ -77,16 +100,14 @@ resource "aws_cloudfront_distribution" "this" {
77100
default_root_object = var.default_root_object
78101
aliases = var.cloudfront_aliases
79102
default_cache_behavior {
80-
allowed_methods = var.allowed_methods
81-
cached_methods = var.cached_methods
82-
target_origin_id = var.s3_origin_id
83-
compress = true
84-
cache_policy_id = aws_cloudfront_cache_policy.this.id
85-
origin_request_policy_id = aws_cloudfront_origin_request_policy.this.id
86-
viewer_protocol_policy = var.viewer_protocol_policy
87-
min_ttl = var.cf_min_ttl
88-
max_ttl = var.cf_max_ttl
89-
default_ttl = var.cf_default_ttl
103+
allowed_methods = var.allowed_methods
104+
cached_methods = var.cached_methods
105+
target_origin_id = var.s3_origin_id
106+
compress = true
107+
cache_policy_id = aws_cloudfront_cache_policy.this.id
108+
origin_request_policy_id = aws_cloudfront_origin_request_policy.this.id
109+
viewer_protocol_policy = var.viewer_protocol_policy
110+
response_headers_policy_id = aws_cloudfront_response_headers_policy.this.id
90111
}
91112
price_class = var.cf_price_class
92113
viewer_certificate {

0 commit comments

Comments
 (0)