You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,13 @@
2
2
3
3
## [Unreleased]
4
4
5
+
## [12.1.3] - 2022-08-12
6
+
7
+
- Uses Image Optimizer module of [Next.js 12.1.3](https://github.com/vercel/next.js/releases/tag/v12.1.3) ([#121](https://github.com/milliHQ/terraform-aws-next-js-image-optimization/pull/121))
8
+
- Updates sharp from `v0.30.3` to [`v0.30.7`](https://github.com/lovell/sharp/releases/tag/v0.30.7) ([#136](https://github.com/milliHQ/terraform-aws-next-js-image-optimization/pull/136))
9
+
- Support usage of custom domain and SSL certificate with the default CloudFront distribution ([#134](https://github.com/milliHQ/terraform-aws-next-js-image-optimization/pull/134))
10
+
- Minimum protocol version for the default CloudFront distribution can now set using `cloudfront_minimum_protocol_version` variable. New default value is `TLSv1` (was `TLSv1.2_2018` before) ([#134](https://github.com/milliHQ/terraform-aws-next-js-image-optimization/pull/134))
11
+
5
12
## [12.1.2] - 2022-04-16
6
13
7
14
- Uses Image Optimizer module of [Next.js 12.1.2](https://github.com/vercel/next.js/releases/tag/v12.1.2) ([#118](https://github.com/milliHQ/terraform-aws-next-js-image-optimization/pull/118))
| cloudfront\_acm\_certificate\_arn | CloudFront ACM certificate to use. |`string`|`null`| no |
127
+
| cloudfront\_aliases | Custom domain(s) for CloudFront. |`list(string)`|`[]`| no |
126
128
| cloudfront\_create\_distribution | Controls whether a CloudFront distribution should be created. |`bool`|`true`| no |
127
129
| cloudfront\_enable\_origin\_shield | Controls whether CloudFront Origin Shield should be enabled on the image optimizer lambdas. |`bool`|`true`| no |
130
+
| cloudfront\_minimum\_protocol\_version | The minimum version of the SSL protocol that you want CloudFront to use for HTTPS connections. One of SSLv3, TLSv1, TLSv1\_2016, TLSv1.1\_2016, TLSv1.2\_2018 TLSv1.2\_2019 or TLSv1.2\_2021. |`string`|`"TLSv1"`| no |
128
131
| cloudfront\_origin\_id | Override the id for the custom CloudFront id. |`string`|`"tf-next-image-optimizer"`| no |
129
-
| cloudfront\_origin\_shield\_region | Override the region choosen for the CloudFront origin shield. Use `auto` to automatically determine the optimal region. |`string`|`"auto"`| no |
132
+
| cloudfront\_origin\_shield\_region | Override the region chosen for the CloudFront origin shield. Use `auto` to automatically determine the optimal region. |`string`|`"auto"`| no |
130
133
| cloudfront\_price\_class | Price class for the CloudFront distribution. One of PriceClass\_All, PriceClass\_200, PriceClass\_100. |`string`|`"PriceClass_100"`| no |
131
134
| debug\_use\_local\_packages | (Debug) Use local packages instead of downloading them from npm. |`bool`|`false`| no |
132
135
| deployment\_name | Identifier for the deployment group (only lowercase alphanumeric characters and hyphens are allowed). |`string`|`"tf-next-image"`| no |
@@ -142,7 +145,7 @@ Then rebuild and redeploy your Next.js application to make use of the changed co
142
145
| next\_image\_domains | Allowed origin domains that can be used for fetching images. |`list(string)`|`[]`| no |
143
146
| next\_image\_formats | If the Accept head matches more than one of the configured formats, the first match in the array is used. Therefore, the array order matters. If there is no match, the Image Optimization API will fallback to the original image's format. |`list(string)`| <pre>[<br> "image/webp"<br>]</pre> | no |
144
147
| next\_image\_image\_sizes | Allowed image sizes that should be used for image optimization. |`list(number)`|`null`| no |
145
-
| next\_image\_version | Next.js version from where you want to use the image optimizer from. Supports semver ranges. |`string`|`"12.1.2"`| no |
148
+
| next\_image\_version | Next.js version from where you want to use the image optimizer from. Supports semver ranges. |`string`|`"12.1.3"`| no |
146
149
| source\_bucket\_id | When your static files are deployed to a Bucket (e.g. with Terraform Next.js) the optimizer can pull the source from the bucket rather than over the internet. |`string`|`null`| no |
147
150
| tags | Tag metadata to label AWS resources that support tags. |`map(string)`|`{}`| no |
148
151
@@ -157,8 +160,7 @@ Then rebuild and redeploy your Next.js application to make use of the changed co
157
160
| cloudfront\_origin | Predefined CloudFront origin. Can be used to embed the image optimizer into an existing CloudFront resource. |
158
161
| cloudfront\_origin\_id | Id of the custom origin used for image optimization. |
159
162
| cloudfront\_origin\_request\_policy\_id | Request policy id used for image optimization. |
This example shows how to configure a custom domain for the [Terraform Next.js Image Optimization module for AWS](https://github.com/milliHQ/terraform-aws-next-js-image-optimization).
4
+
5
+
> **Note:** The full example code is available on [GitHub](https://github.com/milliHQ/terraform-aws-next-js-image-optimization/tree/main/examples/with-custom-domain)
6
+
7
+
## Setup the Terraform module
8
+
9
+
1. Create a new file called `main.tf` and paste the code from the following source: [main.tf on GitHub](https://github.com/milliHQ/terraform-aws-next-js-image-optimization/blob/main/examples/with-custom-domain/main.tf):
10
+
11
+
2. Then configure the domain you want to use:
12
+
13
+
```tf
14
+
# main.tf
15
+
16
+
...
17
+
###########
18
+
# Variables
19
+
###########
20
+
21
+
variable "custom_domain" {
22
+
description = "Your custom domain"
23
+
type = string
24
+
default = "example.com"
25
+
}
26
+
27
+
variable "custom_domain_zone_name" {
28
+
description = "The Route53 zone name of the custom domain"
29
+
type = string
30
+
default = "example.com."
31
+
}
32
+
33
+
...
34
+
```
35
+
36
+
3. Run Terraform to deploy the image optimizer to your AWS account:
37
+
38
+
```sh
39
+
terraform init # Only needed on the first time running Terraform
40
+
41
+
terraform plan # (Optional) See what resources Terraform will create
42
+
terraform apply # Deploy the image optimizer module to your AWS account
43
+
```
44
+
45
+
After Terraform has successfully created all resources in your AWS account, you should see the following output on the terminal:
description="The minimum version of the SSL protocol that you want CloudFront to use for HTTPS connections. One of SSLv3, TLSv1, TLSv1_2016, TLSv1.1_2016, TLSv1.2_2018 TLSv1.2_2019 or TLSv1.2_2021."
0 commit comments