terraform-aws-codebuild icon indicating copy to clipboard operation
terraform-aws-codebuild copied to clipboard

Error: Unsupported block type

Open scottwilkin opened this issue 2 years ago • 5 comments

Describe the Bug

╷
│ Error: Unsupported block type
│ 
│   on .terraform/modules/codebuild/main.tf line 414, in resource "aws_codebuild_project" "default":
│  414:     dynamic "auth" {
│ 
│ Blocks of type "auth" are not expected here.
╵

Expected Behavior

Running the module does not throw this error

Steps to Reproduce

Try running terraform plan with the latest version of the Terraform AWS provider on a Macbook M2 Pro Max with the darwin_arm64 architecture.

  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 5.1.0"
    }
  }

Screenshots

No response

Environment

  • OS: Mac OS Ventura (M2 Max)
  • Version: 13.3.1
  • Module Version: 1.0.0
  • Terraform Version: 1.4.6
  • Platform: darwin_arm64
  • AWS Provider Version: 5.1.0

Additional Context

No response

scottwilkin avatar Jun 09 '23 19:06 scottwilkin

I am getting the exact same issue on a WSL environment. Module version: 0.39.0 Terraform version: 1.4.6 platform: WSL Windows Ubuntu 20.x AWS: 5.3.0

dan100110 avatar Jun 14 '23 22:06 dan100110

figured out the issue. AWS provider 5.x has removed some deprecated blocks. use aws provider <5

dan100110 avatar Jun 20 '23 18:06 dan100110

i am having the same issue. please update your terraform code as auth block is deprecated i guess

Error: Unsupported block type │ │ on .terraform/modules/pipeline-2.codebuild/main.tf line 414, in resource "aws_codebuild_project" "default": │ 414: dynamic "auth" { │ │ Blocks of type "auth" are not expected here.

Umair841 avatar Jun 22 '23 16:06 Umair841

This PR by @max-lobur should fix the issue I believe: https://github.com/cloudposse/terraform-aws-codebuild/pull/126

neubig avatar Jul 18 '23 02:07 neubig

This PR by @max-lobur should fix the issue I believe: #126

This won't fix the removed block source.auth https://registry.terraform.io/providers/hashicorp/aws/latest/docs/guides/version-5-upgrade#resourceaws_codebuild_project

This block is gone.

stevie- avatar Sep 11 '23 14:09 stevie-