Skip to content

Tons of s3 "argument is deprecated" warnings #116

Open
@nk9

Description

@nk9

Describe the Bug

Create an ALB and plan it, and you will get 15 warnings about deprecated S3 arguments. Example:

Warning: Argument is deprecated
with module.project_module.module.alb.module.access_logs.module.s3_bucket.aws_s3_bucket.default
on .terraform/modules/project_module.alb.access_logs.s3_bucket/main.tf line 1, in resource "aws_s3_bucket" "default":

resource "aws_s3_bucket" "default" {

Use the aws_s3_bucket_lifecycle_configuration resource instead

Expected Behavior

No warnings.

Steps to Reproduce

provider "aws" {
  region = var.region
}

# Fetch the pre-existing domain certificate
data "aws_acm_certificate" "domain_cert" {
  domain      = var.domain
  statuses    = ["ISSUED"]
  most_recent = true
}

module "alb" {
  source  = "cloudposse/alb/aws"
  version = "1.1.0"

  attributes = ["alb"]
  tags       = { "declaration" : "alb" }

  vpc_id             = module.vpc.vpc_id
  security_group_ids = [module.vpc.vpc_default_security_group_id]
  subnet_ids         = module.subnets.public_subnet_ids
  internal           = false

  target_group_port = 5000
  http2_enabled   = true
  https_enabled   = true
  certificate_arn = data.aws_acm_certificate.domain_cert.arn
  http_redirect   = true

  access_logs_enabled                     = true
  alb_access_logs_s3_bucket_force_destroy = true
  cross_zone_load_balancing_enabled       = true
  deletion_protection_enabled             = false

  health_check_interval = 30

  context = module.this.context
}

Screenshots

Screenshot 2022-05-12 at 12 40 42

Environment (please complete the following information):

I'm using Terraform Cloud with Terraform 1.1.9

Additional Context

This is presumably related to the changes to the AWS 4 provider. terraform-aws-s3-bucket has been updated (latest version 2.0.1) but the module this module relies upon (aws-lb-s3-bucket) hasn't been updated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug🐛 An issue with the system

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions