cloudposse / terraform-aws-cloudfront-cdn

Terraform Module that implements a CloudFront Distribution (CDN) for a custom origin.
https://cloudposse.com/accelerate
Apache License 2.0
99 stars 121 forks source link

AWS provider v4 breaks module #83

Open Dogers opened 2 years ago

Dogers commented 2 years ago

Describe the Bug

When using the v4.0.0 AWS provider, the module no longer functions correctly:

Error: Unsupported attribute

  on .terraform/modules/logs/main.tf line 30, in resource "aws_s3_bucket" "default":
  30:         for_each = var.enable_glacier_transition ? [1] : []

This object does not have an attribute named "enable_glacier_transition".

Error: Unsupported attribute

  on .terraform/modules/logs/main.tf line 44, in resource "aws_s3_bucket" "default":
  44:         for_each = var.enable_glacier_transition ? [1] : []

This object does not have an attribute named "enable_glacier_transition".
time=2022-02-11T12:18:13Z level=error msg=1 error occurred:
    * exit status 1

Expected Behavior

Module should work!

Steps to Reproduce

Run module as per examples with the v4.0.0 AWS provider

Additional Context

Issue appears to lie with the s3-log-storage module. I have pushed a PR to that module - PR 64 but this module will also need to be updated with new version produced there.

cristobalcl commented 2 years ago

I'm stuck by this issue as well. Any progress?

Dogers commented 2 years ago

Having just seen their update to the S3 storage module, I don't believe they're going to be able to fix this nicely now, so I think we're going to have to either migrate to a new module or fork and maintain our own version :(