created a basic terraform folder structure with modules, while initiating terraform plan getting error unsupported, while overriding instance type file in main file getting unsupported error, attached file structure
ec2(module file)
locals{
amiid = "ami-05548f9cecf47b442"
}
variable "instancetype" {
default = "t2.micro"
}
resource "aws_instance" "ec2-instance" {
ami= local.amiid
instance_type = var.instancetype
}
main.tf file
module "ec2-fst" {
source = "../../modules/ec2"
instance_type = "t3.medium"
}
