**Goal:** instruct TF to handle a single AWS EC2 instance.
Create a "sandbox" directory on your local machine `~/terraform/AWS/`. Inside
it, create a file called `main.tf` (written in HCL language), the
infrastructure *definition* file, with the following content:
``` hcl
terraform{
required_providers{
aws={
source="hashicorp/aws"
version="~> 3.27"
}
}
required_version=">= 0.14.9"
}
provider"aws"{
profile="default"
region="us-east-1"
}
resource"aws_instance""app_server"{
ami="<your-AWS-AMI-ID>"
instance_type="t2.micro"
tags={
Name="ExampleAppServerInstance"
}
}
```
To find `<your-AWS-AMI-ID>`, you can query the AMI Catalog via
a. [AWS dashboard](https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#AMICatalog:), searching "Ubuntu", selecting "Quickstart AMIs" and filtering by "Free-tier",