Code QuizAdvanced

Terraform Provider & Resource Basics

Spot the mistake in a basic Terraform AWS provider and EC2 resource configuration.

Codehcl
provider "aws" {
  region = "us-east-1"
}

resource "aws_instance" "web" {
  ami_id        = "ami-0abcd1234ef567890"
  instance_type = "t2.micro"

  tags = {
    Name = "web-server"
  }
}

When you run terraform plan/apply, this fails with an error. What is the bug?