Releases: cloudposse/terraform-aws-cloudfront-s3-cdn
Releases · cloudposse/terraform-aws-cloudfront-s3-cdn
0.12.0 Allow removing `origin` from the origin label
what
- Allow customizing attributes for the origin and logs bucket
why
- Allow customizing the last part of the s3 origin bucket name
- Allow customizing the last part of the s3 logs bucket name
related
- Closes #57
0.11.0 Add additional bucket policies
what
- Add additional bucket policies
why
- Solution in case there are additional policies needed for the bucket
0.10.0 Use var.enabled as a bool not a string
what
- Use
var.enabled
as a bool not a string
why
var.enabled
been changed to typebool
but thedns
module used within this module was still comparing it to a string. This caused the DNS record to be removed even when enabled is true andvar.parent_zone_id
is provided
0.9.0 Convert to TF 0.12. Add tests. Add Codefresh test pipeline
what
- Port module to Terraform 0.12
- Pin all providers
- Add example for testing
- Add
bats
andterratest
for the example - Add Codefresh badge to point to the test pipeline in
terraform-modules
project - Update README
why
- Module currently does not work with 0.12. Much easier syntax
- Better regression control
- Automatically test the example on every commit and pull request
- Provision resources on AWS in the test account and check the outputs for the correct values
terraform-modules
project contains pipelines for all terraform modules
0.8.0 Add `wait_for_deployment` variable
what
- Add
wait_for_deployment
variable
why
- It has been added to the 2.5.0 AWS terraform provider
references
0.7.0 Fix `enabled` field for `dns` module
what
- Fix
enabled
field fordns
module
why
- Don't create a DNS record if no zone ID/Name are provided
0.6.0 Add var and module property for trusted_signers
what
- Add var and module property for
trusted_signers
why
- Allows the user to add trusted signers to a CloudFront distribution
0.5.0 Add web_acl_id
what
- Add
web_acl_id
parameter
why
- Missing
0.4.0 Add `lambda_function_association` variable
what
- Add
lambda_function_association
variable
why
- To be able to trigger a lambda function with specific actions
example
module "cdn" {
source = "../"
namespace = "eg"
stage = "prod"
name = "app"
aliases = ["assets.cloudposse.com"]
parent_zone_id = "${aws_route53_zone.primary.zone_id}"
use_regional_s3_endpoint = "true"
origin_force_destroy = "true"
cors_allowed_headers = ["*"]
cors_allowed_methods = ["GET", "HEAD", "PUT"]
cors_allowed_origins = ["*.cloudposse.com"]
cors_expose_headers = ["ETag"]
lambda_function_association = [
{
event_type = "viewer-request"
lambda_arn = "arn:aws:lambda:us-east-1:${var.account_id}:function:${local.func_name}:12"
},
]
}
note
When using attributes of your own resource, the following error will be occurred.
https://stackoverflow.com/questions/52202672/terraform-lambda-function-association-for-cloudfront-as-optional-list-within-a-ma
example
lambda_arn = "${aws_lambda_function.some-function.arn}:${aws_lambda_function.some-function.version}"
ref. hashicorp/terraform#16582
For the above reason, lambda_function_association
must be defined directly in the current terraform version.
0.3.5: Update readme yaml file and rebuild md
what
- updated
README.yaml
file - add tags and categories
- rebuild
README.md
file
why
- need to add categories and tags so we can pull them into the documentation