I have just getting started with terraform
using aws
services.
- I just created a new user IAM user and given it AdministrativeAccess
- Copied down the Access Key and Secret and pasted it in terraform
instance.tf
file underprovider "aws" {}
- Ran the command:
terraform init
and it worked fine. - Ran the command:
terraform apply
but in the end it gives me following error:
aws_instance.example: Creating...
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: cf85fdcf-432e-23d3-1233-790cfb2aa33fs
on instance.tf line 7, in resource "aws_instance" "example": 7: resource "aws_instance" "example" {
Here is my terraform
code:
provider "aws" {
access_key = "ACCESS_KEY"
secret_key = "SECRET_KEY"
region = "us-east-2"
}
resource "aws_instance" "example" {
ami = "ami-0b9bd0b532ebcf4c9"
instance_type = "t2.micro"
}
Any help would be appreciatable,
Cheers :)