FIX ERROR – Terraform: Blocks of type "tags" are not expected here.

When trying to make a terraform plan or  terraform apply, terraform returns the following error:

Error: Unsupported block type

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.

 

Solution:

In terraform versions below the 12, the following syntax was used for "tags":

  tags {
    Name = "MY_TAG_NAME"
  }

 

Now after "tags" you need to add "="

  tags = {
    Name = "MY_TAG_NAME"
  }

Tagged: Tags

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments