AWS An argument or block definition is required here

Hi
Thanks for help. I am using Terraform v1.3.6 on windows_386

I am logged already on AWS(API key)

I I am getting this error when i try to apply terraform fmt

Error: Argument or block definition required
│
│   on main.tf line 3:
│    3: }
│
│ An argument or block definition is required here.
╵

╷
│ Error: Missing attribute separator
│
│   on variables.tf line 18, in variable "private_subnets":
│   17: default = {
│   18: "private_subnet_1" = 1 "private_subnet_2" = 2 "private_subnet_3" = 3
│
│ Expected a newline or comma to mark the beginning of the next attribute.
╵

Here is my main.tf

# Configure the AWS Provider

provider "aws" {

region = "us-east-1"

}

#Retrieve the list of AZs in the current AWS region

data "aws_availability_zones" "available" {} data "aws_region" "current" {}

#Define the VPC

resource "aws_vpc" "vpc" {

cidr_block = var.vpc_cidr tags = { Name = var.vpc_name

Environment = "demo_environment"

Terraform = "true"

}

}

and my variables.tf

}

variable "vpc_cidr" {

type = string

default = "10.0.0.0/16"

}

variable "private_subnets" {

default = {

"private_subnet_1" = 1

"private_subnet_2" = 2

"private_subnet_3" = 3

}

}

I think you have something weird going on with your line endings.

According to Terraform, this is all one line:

but when you copy/paste the same yourself, it appears differently:

Thanks, unfortunately same error message, here is a screenshot

Having them all on one line is wrong. You need to fix that.