Skip to content

Releases: cloudposse/terraform-aws-cloudfront-s3-cdn

0.12.0 Allow removing `origin` from the origin label

10 Jan 21:48
Compare
Choose a tag to compare

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

0.11.0 Add additional bucket policies

04 Nov 17:38
Compare
Choose a tag to compare

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

19 Jul 18:07
Compare
Choose a tag to compare

what

  • Use var.enabled as a bool not a string

why

  • var.enabled been changed to type bool but the dns 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 and var.parent_zone_id is provided

0.9.0 Convert to TF 0.12. Add tests. Add Codefresh test pipeline

30 Jun 03:19
7c9db75
Compare
Choose a tag to compare

what

  • Port module to Terraform 0.12
  • Pin all providers
  • Add example for testing
  • Add bats and terratest 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

09 Apr 20:42
Compare
Choose a tag to compare

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

08 Feb 04:08
Compare
Choose a tag to compare

what

  • Fix enabled field for dns 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

07 Jan 22:16
Compare
Choose a tag to compare

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

05 Jan 05:08
Compare
Choose a tag to compare

what

  • Add web_acl_id parameter

why

  • Missing

0.4.0 Add `lambda_function_association` variable

04 Jan 17:25
Compare
Choose a tag to compare

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

10 Dec 09:56
cf29a8b
Compare
Choose a tag to compare

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