next-js
dealmore/next-js/aws
Terraform module for building and deploying Next.js apps to AWS. Supports SSR (Lambda), Static (S3) and API (Lambda) pages.
Terraform Next.js module for AWS !CI status A zero-config Terraform module for self-hosting Next.js sites serverless on AWS Lambda. Features Some features are still under development, here is a list of features that are currently supported and what we plan to bring with the next releases: - ✅ Next.js v9.5+ & v10+ _(older Versions might work but are not actively supported)_ - ✅ Terraform v0.13+ - ✅ Static, SSG, Lambda and API pages (with dynamic routes) - ✅ Automatic expiration of old static assets - ✅ Rewrites & Redirects - ✅ Image Component & Image Optimization support - 🚧 Incremental Static Regeneration - 🚧 AWS CodeDeploy Architecture The Next.js Terraform module is designed as a full stack AWS app. It relies on multiple AWS services and co
| Name | Type | Description | Default |
|---|---|---|---|
| cloudfront_external_id | string | When using an external CloudFront distribution provide its id. | required |
| domain_name | string | This is used to figure out which preview deployment to route to. | required |
| cloudfront_acm_certificate_arn | string | ACM certificate arn for custom_domain | required |
| lambda_role_permissions_boundary | string | ARN of IAM policy that scopes aws_iam_role access for the lambda | required |
| lambda_policy_json | string | Additional policy document as JSON to attach to the Lambda Function role | required |
| cloudfront_external_arn | string | When using an external CloudFront distribution provide its arn. | required |
| multiple_deployments | bool | Have multiple deployments and domain aliases. | false |
| next_tf_dir | string | Relative path to the .next-tf dir. | "./.next-tf" |
| lambda_environment_variables | map(string) | Map that defines environment variables for the Lambda Functions in Next.js. | {} |
| lambda_timeout | number | Max amount of time a Lambda Function has to return a response in seconds. Should | 10 |
| vpc_subnet_ids | list(string) | The list of VPC subnet IDs to attach the Lambda functions. lambda_attach_to_vpc | [] |
| vpc_security_group_ids | list(string) | The list of Security Group IDs to be used by the Lambda functions. lambda_attach | [] |
| cloudfront_create_distribution | bool | Controls whether the main CloudFront distribution should be created. | true |
| cloudfront_cache_key_headers | list(string) | Header keys that should be used to calculate the cache key in CloudFront. | [
"Authorization"
] |
| image_optimization_lambda_memory_size | number | Amount of memory in MB the worker Lambda Function for image optimization can use | 2048 |
| use_awscli_for_static_upload | bool | Use AWS CLI when uploading static resources to S3 instead of default Bash script | false |
| deployment_name | string | Identifier for the deployment group (alphanumeric characters, underscores, hyphe | "tf-next" |
| expire_static_assets | number | Number of days after which static assets from previous deployments should be rem | 30 |
| lambda_memory_size | number | Amount of memory in MB a Lambda Function can use at runtime. Valid value between | 1024 |
| lambda_attach_to_vpc | bool | Set to true if the Lambda functions should be attached to a VPC. Use this settin | false |
| tags | map(string) | Tag metadata to label AWS resources that support tags. | {} |
| debug_use_local_packages | bool | Use locally built packages rather than download them from npm. | false |
| lambda_runtime | string | Lambda Function runtime | "nodejs14.x" |
| create_image_optimization | bool | Controls whether resources for image optimization support should be created or n | true |
| cloudfront_minimum_protocol_version | string | The minimum version of the SSL protocol that you want CloudFront to use for HTTP | "TLSv1" |
| cloudfront_origin_headers | list(string) | Header keys that should be sent to the S3 or Lambda origins. Should not contain | [] |
cloudfront_domain_name — Domain of the main CloudFront distribution (When created).cloudfront_hosted_zone_id — Zone id of the main CloudFront distribution (When created).cloudfront_default_root_object — Preconfigured root object the CloudFront distribution should use.cloudfront_default_cache_behavior — Preconfigured default cache behavior the CloudFront distribution should use.cloudfront_ordered_cache_behaviors — Preconfigured ordered cache behaviors the CloudFront distribution should use.cloudfront_origins — Preconfigured origins the CloudFront distribution should use.cloudfront_custom_error_response — Preconfigured custom error response the CloudFront distribution should use.static_upload_bucket_idTerraform module to deploy landing zone subscriptions (and much more) in Azure
Terraform Azure Verified Pattern Module for Azure Landing Zone
Terraform Azure Verified Resource Module for Key Vault
Terraform module for provisioning an EKS cluster