linuxacademy / content-deploying-to-aws-ansible-terraform

Deploying to AWS with Ansible and Terraform, Moosa Khalid, 051320
158 stars 470 forks source link

Error Configuring Terraform Provisioners for Config Management via Ansible #1

Closed elzerver closed 3 years ago

elzerver commented 4 years ago

Hello,

I'm having the following error trying to test the example of the video. I need to point out that the first execution/creation of an ec2 instance was successful.

aws_instance.jenkins-worker-oregon[0]: Creating...

Error: Error launching source instance: Unsupported: Your requested instance type (t2.micro) is not supported in your requested Availability Zone (us-west-2d). Please retry your request by not specifying an Availability Zone or choosing us-west-2a, us-west-2b, us-west-2c.
    status code: 400, request id: eb1473b6-a476-43b4-bb7e-1d90f61fa9b5

cheers!

cs-huckleberry commented 4 years ago

Try using a t3.micro. They are newer, and typically cheaper if I remember correctly. I get the same error if I try and deploy a t2.micro to us-west-2d, but the t3.micro deploys with no issues.

moosakhalidLA commented 3 years ago

Hi @elzerver , as @mperfct2 pointed out sometimes the availability of a certain instance type is reduced or the instance type is not available in an AZ altogether that's when you see such errors. As mentioned changing to the newer t3.micro will help.