Last active
August 30, 2021 18:36
-
-
Save ofhouse/bc4dc4d3d296c598ea3adcfa41f67935 to your computer and use it in GitHub Desktop.
Initialize Terraform Next.js Image Optimization module for AWS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_providers { | |
aws = { | |
source = "hashicorp/aws" | |
version = "~> 3.0" | |
} | |
} | |
} | |
# Main AWS region where the resources should be created in | |
# Should be close to where your Next.js deployment is located | |
provider "aws" { | |
region = "us-east-1" | |
} | |
module "next_image_optimizer" { | |
source = "milliHQ/next-js-image-optimization/aws" | |
next_image_domains = ["example.com", "sub.example.com"] | |
} | |
output "domain" { | |
value = module.next_image_optimizer.cloudfront_domain_name | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment