So I tried to spin up an EC2 instance using Terraform on my Mac (which is running Sierra and Terraform 0.11.5) but keep getting a few errors:
Command: terraform plan
Error: Error parsing /Users/*****/terraform/aws.tf: At 1:11: illegal char
Command: terraform show
Error: Failed to load backend: Error loading backend config: Error parsing /Users/******/terraform/aws.tf: At 1:11: illegal char
Here is what my file looks like:
provider "aws" {
region = "us-east-1"
access_key = ""
secret_key = "********"
}
resource "aws_key_pair" "nick-key" {
key_name = "nick-key"
public_key = "ssh-rsa ********************************************"
}
resource "aws_instance" "web" {
ami = "ami-1853ac65"
instance_type = "t2.micro"
key_name = "${aws_key_pair.nick-key.key_name}"
I put * in place of the real information used in the file in case anyone was wondering. Any help would be greatly appreciated!! Thank you in advance!