youngfeldt/terraform-aws-backend-s3

Unsupported block type

Opened this issue · 1 comments

When running terraform validate (Terraform version 1.0.3) on version 1.3.3 of this module as follows:

terraform {
  required_version = ">= 1.0"
  required_providers {
    aws = {
      # Allow any 3.x version of the AWS provider
      # Current version is 3.51 as of this writing
      version = "~> 3.0"
    }
  }
}

provider "aws" {
  region = "us-west-1"
}

module "backend-s3" {
  source  = "youngfeldt/backend-s3/aws"
  version = "1.3.3"
  # insert the 3 required variables here
  backend_dynamodb_lock_table = "ohana-dynamodb-table-terraform-lock"
  backend_s3_bucket = "ohana-s3-bucket-terraform-state"
  s3_key = "common/tf.state"
  # override optional variables here
  create_dynamodb_lock_table = true
  create_s3_bucket = true
}

I get the following error:

╷
│ Error: Unsupported block type
│ 
│   on .terraform/modules/backend-s3/main.tf line 22, in resource "aws_s3_bucket" "s3_backend":
│   22:   tags {
│ 
│ Blocks of type "tags" are not expected here. Did you mean to define argument "tags"? If so, use the equals sign to assign it a value.
╵
╷
│ Error: Unsupported block type
│ 
│   on .terraform/modules/backend-s3/main.tf line 41, in resource "aws_dynamodb_table" "terraform_state_lock":
│   41:   tags {
│ 
│ Blocks of type "tags" are not expected here. Did you mean to define argument "tags"? If so, use the equals sign to assign it a value.
╵

Hi. Thank you for sharing.
I wrote this before terraform 0.14 was released.
It will not run in newer syntax.
I will be deprecating this module.