cloudposse / terraform-aws-config-storage

This module creates an S3 bucket suitable for storing AWS Config data
https://cloudposse.com/accelerate
Apache License 2.0
6 stars 8 forks source link

Bug in Storage Module #22

Open tuxtek opened 2 years ago

tuxtek commented 2 years ago

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

The module is broken currently due to a bug in the s3 storage module.

Error: Unsupported attribute
│ 
│   on .terraform/modules/aws_config_storage.storage/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".

Expected Behavior

Plan should be successful.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Clone repo
  2. Init and plan example
    MWB-GM74GP916H~/code(:|✔) % git clone git@github.com:cloudposse/terraform-aws-config-storage.git
    Cloning into 'terraform-aws-config-storage'...
MWB-GM74GP916H~/code/terraform-aws-config-storage/examples/complete(master|)
terraform init
Initializing modules...
- s3_aws_config in ../..
Downloading registry.terraform.io/cloudposse/label/null 0.25.0 for s3_aws_config.aws_config_label...
- s3_aws_config.aws_config_label in .terraform/modules/s3_aws_config.aws_config_label
Downloading registry.terraform.io/cloudposse/s3-log-storage/aws 0.26.0 for s3_aws_config.storage...
- s3_aws_config.storage in .terraform/modules/s3_aws_config.storage
Downloading registry.terraform.io/cloudposse/label/null 0.25.0 for s3_aws_config.storage.this...
- s3_aws_config.storage.this in .terraform/modules/s3_aws_config.storage.this
Downloading registry.terraform.io/cloudposse/label/null 0.25.0 for s3_aws_config.this...
- s3_aws_config.this in .terraform/modules/s3_aws_config.this
Downloading registry.terraform.io/cloudposse/label/null 0.25.0 for this...
- this in .terraform/modules/this
Initializing the backend...
Initializing provider plugins...
- Finding hashicorp/aws versions matching ">= 2.0.0, >= 3.0.0"...
- Finding hashicorp/time versions matching ">= 0.7.0"...
MWB-GM74GP916H~/code/terraform-aws-config-storage/examples/complete(master|✔) % 
terraform plan
var.region
  Enter a value: us-east-1
│ Error: Unsupported attribute
│   on .terraform/modules/s3_aws_config.storage/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/s3_aws_config.storage/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".

Anything that will help us triage the bug will help. Here are some ideas:

Additional Context

Add any other context about the problem here.