HashiCorp Learn - Change Infrastructure - plus+ minus- symbols don't work

Hi all,

I am currently busy learning Terraform. However, when I reached lesson 3 of the tutorial, my IDE gave the following error when changing infrastructure on AWS:

I followed the exact steps in the tutorial and I tried to google the problem, but I couldn’t find anything. I hope somebody can help me!

Hi @Obdam,

I think the intent of the author of this guide was not that you copy the - and + literally into your file, but rather that you treat those symbols as a guide for what to change: remove the ami = "ami-830c94e3" line and insert ami = "ami-08d70e59c07c61a3a" in place of it.

That would then leave you with the following, which is valid Terraform syntax:

resource "aws_instance" "example" {
  ami           = "ami-08d70e59c07c61a3a"
  instance_type = "t2.micro"

Hi @apparentlymart,

Thank you very much! As logic as it seems! As an old saying goes, don’t just copy code from the internet :slight_smile: