Jenia Be Nice Please
Jenia Be Nice Please

Reputation: 2703

Terraform AWS, instance not created

I'm going through the Terraform tutorial for AWS. When I apply the Terraform file (exactly as it is in the tutorial), I get:

# aws_instance.example will be created
+ resource "aws_instance" "example" {
    ...
  }
  ...
  apply complete! Resources: 1 added, 0 changed, 0 destroyed.

But when I go to the dashboard of EC2, I don't see the instance. I only have 1 security group.

What am I doing wrong?

P.S. Here is my region that I set in aws configure: use2-az1

Upvotes: 0

Views: 616

Answers (1)

samtoddler
samtoddler

Reputation: 9665

you can run terraform show command in the directory where you ran terraform apply it will show you the all the resource created.

Plus don't use AZ ID AZ IDs for your AWS resources even in your configuration for credentials, unless you have a very specific reason to do so.

As per the tutorial you have configured your aws provider:

provider "aws" {
  profile = "default"
  region  = "us-west-2"
}

Because you mentioned you followed exactly as it is in tutorial , you should be able to see the instance in the respective region which is us-west-2.

Upvotes: 1

Related Questions