I’m learning Terraform course ‘Learn DevOps: Infrastructure Automation With Terraform’ from Udemy. As per the exercise 'First steps in terraform - Spinning up an instance’ when i’m running ‘instance.tf’ i’m getting the below error.
Error: Error launching source instance: Unsupported: The requested configuration is currently not supported. Please check the documentation for supported configurations.
status code: 400, request id: cbfbb2e8-35bd-4527-8da3-b59506c55b81
on instance.tf line 7, in resource "aws_instance" "example":
7: resource "aws_instance" "example" {
Here is my instance.tf file.
provider "aws" {
access_key = "XXXXXXXXXXXXXXXXXX"
secret_key = "XXXXXXXXXXXXXXXXXXXXXXXXXX"
region = "ap-south-1"
}
resource "aws_instance" "example" {
ami = "ami-0e175be6acf8b637d"
instance_type = "t2.micro"
}
Please help.