Skip to content

Commit

Permalink
Merge commit '4b3dfff74ab403dae909026f726db7151aa4be8f' into release-…
Browse files Browse the repository at this point in the history
…v0.x
  • Loading branch information
github-actions[bot] committed May 28, 2022
2 parents 69f04c6 + 4b3dfff commit 33ae64c
Show file tree
Hide file tree
Showing 14 changed files with 46 additions and 32 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- main
- v[0-9]+.[0-9x]+.x
- v[0-9]+.[0-9x]
pull_request:

env:
Expand All @@ -13,9 +13,12 @@ env:
jobs:
build:
runs-on: ubuntu-latest
container: registry.gitlab.com/dealmore/dealmore-build-images/lambda:nodejs14.x
container: public.ecr.aws/sam/build-nodejs16.x:latest

steps:
- name: Install yarn
run: npm install --global yarn@1.22.18

- uses: actions/checkout@v2

- name: Cache
Expand Down Expand Up @@ -48,7 +51,7 @@ jobs:
test-integration:
needs: build
runs-on: ubuntu-latest
container: registry.gitlab.com/dealmore/dealmore-build-images/lambda:nodejs14.x
container: public.ecr.aws/sam/build-nodejs16.x:latest
services:
s3:
image: registry.gitlab.com/dealmore/dealmore-build-images:s3-emulator
Expand All @@ -62,6 +65,9 @@ jobs:
S3_ENDPOINT: s3:9000

steps:
- name: Install yarn
run: npm install --global yarn@1.22.18

- uses: actions/checkout@v2

- name: Cache
Expand All @@ -87,8 +93,11 @@ jobs:
test-e2e-prepare:
needs: build
runs-on: ubuntu-latest
container: registry.gitlab.com/dealmore/dealmore-build-images/lambda:nodejs14.x
container: public.ecr.aws/sam/build-nodejs16.x:latest
steps:
- name: Install yarn
run: npm install --global yarn@1.22.18

- uses: actions/checkout@v2

- name: Cache
Expand Down Expand Up @@ -183,7 +192,7 @@ jobs:
name: Potentially publish release
runs-on: ubuntu-latest
needs: [build, test-integration, test-e2e]
if: github.ref == 'refs/heads/main'
if: ${{ (github.ref == 'refs/heads/main') || (github.ref == 'refs/heads/v0.x') }}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- main
- v[0-9]+.[0-9x]+.x
- v[0-9]+.[0-9x]
pull_request:

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tf-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
push:
branches:
- main
- v[0-9]+.[0-9x]+.x
- v[0-9]+.[0-9x]

jobs:
update-docs:
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## [Unreleased]

## [0.13.0] - 2022-05-28

- Adds support for nodejs16.x runtime ([#318](https://github.com/milliHQ/terraform-aws-next-js/pull/318), [#316](https://github.com/milliHQ/terraform-aws-next-js/issues/316), [#315](https://github.com/milliHQ/terraform-aws-next-js/issues/315))
- Increases minimum required Terraform AWS provider version from `4.8` to `4.15.0`

## [0.12.2] - 2022-04-16

- Append querystring to redirects ([#296](https://github.com/milliHQ/terraform-aws-next-js/issues/296), [#304](https://github.com/milliHQ/terraform-aws-next-js/pull/304))
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Some features are still under development, here is a list of features that are c

The Next.js Terraform module is designed as a full stack AWS app. It relies on multiple AWS services and connects them to work as a single application:

![Architecture overview diagram](https://github.com/milliHQ/terraform-aws-next-js/blob/main/docs/assets/architecture.png?raw=true)
![Architecture overview diagram](https://github.com/milliHQ/terraform-aws-next-js/blob/v0.x/docs/assets/architecture.png?raw=true)

- **`I.` CloudFront**

Expand Down Expand Up @@ -181,15 +181,15 @@ You can create a `.terraformignore` in the root of your project and add the foll

## Examples

- [Complete](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/complete)
- [Complete](https://github.com/milliHQ/terraform-aws-next-js/tree/v0.x/examples/complete)
Complete example with SSR, API and static pages.
- [Static](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/static)
- [Static](https://github.com/milliHQ/terraform-aws-next-js/tree/v0.x/examples/static)
Example that uses static pages only (No SSR).
- [Next Image](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/next-image)
- [Next Image](https://github.com/milliHQ/terraform-aws-next-js/tree/v0.x/examples/next-image)
Images are optimized on the fly by AWS Lambda.
- [Existing CloudFront](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/with-existing-cloudfront)
- [Existing CloudFront](https://github.com/milliHQ/terraform-aws-next-js/tree/v0.x/examples/with-existing-cloudfront)
Use the module together with an existing CloudFront distribution that can be fully customized.
- [Custom Domain](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/with-custom-domain)
- [Custom Domain](https://github.com/milliHQ/terraform-aws-next-js/tree/v0.x/examples/with-custom-domain)
Use the module with your own domain from Route 53.

<!-- prettier-ignore-start -->
Expand All @@ -199,13 +199,13 @@ You can create a `.terraformignore` in the root of your project and add the foll
| Name | Version |
|------|---------|
| terraform | >= 0.15 |
| aws | >= 4.8 |
| aws | >= 4.15.0 |

## Providers

| Name | Version |
|------|---------|
| aws | >= 4.8 |
| aws | >= 4.15.0 |

## Inputs

Expand Down Expand Up @@ -233,7 +233,7 @@ You can create a `.terraformignore` in the root of your project and add the foll
| lambda\_memory\_size | Amount of memory in MB a Lambda Function can use at runtime. Valid value between 128 MB to 10,240 MB, in 1 MB increments. | `number` | `1024` | no |
| lambda\_policy\_json | Additional policy document as JSON to attach to the Lambda Function role | `string` | `null` | no |
| lambda\_role\_permissions\_boundary | ARN of IAM policy that scopes aws\_iam\_role access for the lambda | `string` | `null` | no |
| lambda\_runtime | Lambda Function runtime | `string` | `"nodejs14.x"` | no |
| lambda\_runtime | Lambda Function runtime | `string` | `"nodejs16.x"` | no |
| lambda\_timeout | Max amount of time a Lambda Function has to return a response in seconds. Should not be more than 30 (Limited by API Gateway). | `number` | `10` | no |
| next\_tf\_dir | Relative path to the .next-tf dir. | `string` | `"./.next-tf"` | no |
| tags | Tag metadata to label AWS resources that support tags. | `map(string)` | `{}` | no |
Expand Down Expand Up @@ -281,9 +281,9 @@ So issues that exist on Vercel are likely to occur on this project too.

**Workaround:**

You should be able to run`terraform apply` again and the stack creation would progreed without this error.
You should be able to run`terraform apply` again and the stack creation would proceed without this error.

- [Function decreases account's UnreservedConcurrentExecution below its minimum value](https://github.com/milliHQ/terraform-aws-next-js/tree/main/docs/known-issues/0001_reserved-concurrent-executions.md)
- [Function decreases account's UnreservedConcurrentExecution below its minimum value](https://github.com/milliHQ/terraform-aws-next-js/tree/v0.x/docs/known-issues/0001_reserved-concurrent-executions.md)

## Contributing

Expand Down
4 changes: 2 additions & 2 deletions examples/complete/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

This example contains a fully featured Next.js app (Static files, API-Routes, SSR) that can be deployed using the [Terraform Next.js for AWS](https://registry.terraform.io/modules/milliHQ/next-js/aws) module.

You can find the full example code on [GitHub](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/complete).
You can find the full example code on [GitHub](https://github.com/milliHQ/terraform-aws-next-js/tree/v0.x/examples/complete).

## Setup

Download the files from the example app:

```sh
yarn create next-app --example https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/complete my-app
yarn create next-app --example https://github.com/milliHQ/terraform-aws-next-js/tree/v0.x/examples/complete my-app

cd my-app
```
Expand Down
4 changes: 2 additions & 2 deletions examples/next-image/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Terraform Next.js Image component example

This example shows the usage of Next.js together with the `next/image` component.
You can find the full example code on [GitHub](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/next-image).
You can find the full example code on [GitHub](https://github.com/milliHQ/terraform-aws-next-js/tree/v0.x/examples/next-image).

> **Note:** Support for `next/image` component is enabled in the Terraform Next.js module by default and requires no extra config other than the standard setup!
Expand All @@ -10,7 +10,7 @@ You can find the full example code on [GitHub](https://github.com/milliHQ/terraf
Download the files from the example app:

```sh
yarn create next-app --example https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/next-image my-app
yarn create next-app --example https://github.com/milliHQ/terraform-aws-next-js/tree/v0.x/examples/next-image my-app

cd my-app
```
Expand Down
4 changes: 2 additions & 2 deletions examples/static/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

This example shows a simple static Next.js app that is deployed to S3 without lambdas using the [Terraform Next.js for AWS](https://registry.terraform.io/modules/milliHQ/next-js/aws) module.

You can find the full example code on [GitHub](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/static).
You can find the full example code on [GitHub](https://github.com/milliHQ/terraform-aws-next-js/tree/v0.x/examples/static).

## Setup

Download the files from the example app:

```sh
yarn create next-app --example https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/static my-app
yarn create next-app --example https://github.com/milliHQ/terraform-aws-next-js/tree/v0.x/examples/static my-app

cd my-app
```
Expand Down
4 changes: 2 additions & 2 deletions examples/with-custom-domain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ This example shows how to use a custom domain with the [Next.js Terraform module
- Provisions a free SSL certificate from the AWS Certificate Manager for the domain
- Assigns the domain and the SSL certificate to the CloudFront distribution

> **Note:** You can find the full example code on [GitHub](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/with-custom-domain).
> **Note:** You can find the full example code on [GitHub](https://github.com/milliHQ/terraform-aws-next-js/tree/v0.x/examples/with-custom-domain).
## Setup

Download the files from the example app:

```sh
yarn create next-app --example https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/with-custom-domain my-app
yarn create next-app --example https://github.com/milliHQ/terraform-aws-next-js/tree/v0.x/examples/with-custom-domain my-app

cd my-app
```
Expand Down
4 changes: 2 additions & 2 deletions examples/with-existing-cloudfront/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

This example shows how to integrate the Terraform Next.js module for AWS into an existing CloudFront distribution (Without creating a new one).

> **Note:** The full example code is available on [GitHub](https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/with-existing-cloudfront)
> **Note:** The full example code is available on [GitHub](https://github.com/milliHQ/terraform-aws-next-js/tree/v0.x/examples/with-existing-cloudfront)
## Setup

Download the files from the example app:

```sh
yarn create next-app --example https://github.com/milliHQ/terraform-aws-next-js/tree/main/examples/with-existing-cloudfront my-app
yarn create next-app --example https://github.com/milliHQ/terraform-aws-next-js/tree/v0.x/examples/with-existing-cloudfront my-app

cd my-app
```
Expand Down
2 changes: 1 addition & 1 deletion modules/proxy/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

variable "proxy_module_version" {
type = string
default = "0.12.2"
default = "0.13.0"
}

variable "lambda_default_runtime" {
Expand Down
2 changes: 1 addition & 1 deletion modules/statics-deploy/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ variable "static_files_archive" {

variable "deploy_trigger_module_version" {
type = string
default = "0.12.2"
default = "0.13.0"
}

variable "expire_static_assets" {
Expand Down
2 changes: 1 addition & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ variable "lambda_environment_variables" {
variable "lambda_runtime" {
description = "Lambda Function runtime"
type = string
default = "nodejs14.x"
default = "nodejs16.x"
}

variable "lambda_memory_size" {
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.8"
version = ">= 4.15.0"
configuration_aliases = [aws.global_region]
}
}
Expand Down

0 comments on commit 33ae64c

Please sign in to comment.