Something wrong with terraform tests

The task was to delete the aws resources using terraform. I commented the below code. Even plan and apply shows resource is deleted. But the lab is reporting otherwise

Kodekloud Engineer - > terraform lea → Delete EC2 Instance Using Terraform

# Provision EC2 instance
#resource "aws_instance" "ec2" {
#  ami           = "ami-0c101f26f147fa7fd"
#  instance_type = "t2.micro"
#  vpc_security_group_ids = [
#    "sg-4dc765d10b51e999b"
#  ]

#  tags = {
#    Name = "nautilus-ec2"
#  }
#}

HI @sacsachin

Can you please share the Level and the task number for this?

Hi @sacsachin

I think you should use terraform destroy instead of just commenting out the code and running terraform apply. The question should include a note about this.

terraform destory did the job Ty!
Adding a note will be nice, otherwise it can be confusing.

Lab:
Kodekloud Engineer - > terraform → Level 1 → Delete EC2 Instance Using Terraform

Ty!