Releases: dashdevs/terraform-aws-static-website
Releases · dashdevs/terraform-aws-static-website
v3.0.0
What's New
- CloudFront Function Support: Added
cloudfront_event_functionsvariable to attachviewer-requestandviewer-responsefunctions to the distribution - Basic Auth: Introduced
cloudfront-functions/basic-authsubmodule for simple CloudFront Basic Authentication using Key Value Store - Provider Configuration Update: The
us-east-1(Virginia) provider is now expected as an aliased provider (aws.virginia) from the root module, improving compatibility and fixing legacy module issues when usingcountorfor_each
Breaking Changes
- Requires aliased provider
aws.virginiadefined in the root module - Updated provider to
aws >= 4.42and Terraform to>= 1.5.2
Upgrade
- Define an aliased provider for
us-east-1(Virginia) in your root module:
provider "aws" {
region = "eu-west-1"
}
provider "aws" {
alias = "virginia"
region = "us-east-1"
}
- Pass the aliased provider into the module using the providers map:
module "website" {
source = "dashdevs/static-website/aws"
version = "~> 3.0"
providers = { aws.virginia = aws.virginia }
# other module inputs...
}
- Update your
terraformblock to require the new provider version (>= 4.42) and Terraform version (>= 1.5.2) - Apply the configuration to safely migrate to
v3.0.0
v2.1.1
v2.1.0
v2.0.0
What's New
- Migrate to Cache Policy: Replaced deprecated CloudFront cache settings with
aws_cloudfront_cache_policyfor better flexibility and alignment with AWS recommendations - OAI to OAC Migration: Switched from Origin Access Identity (OAI) to Origin Access Control (OAC) for improved security and broader region support
- Region-Specific S3 Endpoint: Updated CloudFront to use region-specific S3 bucket endpoints to prevent redirects and improve performance
Breaking Changes
- OAI to OAC Migration: An active OAI can't be deleted until CloudFront is updated to use OAC
Upgrade
- Run
terraform apply -target=aws_cloudfront_distribution.websiteto update CloudFront - Apply the full configuration afterward to safely remove OAI