Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error launching source instance: Your requested instance type (t2.micro) not supported in your requested Availability Zone (us-west-2d). #68

Closed
ghost opened this issue Feb 22, 2019 · 8 comments

Comments

@ghost
Copy link

ghost commented Feb 22, 2019

Getting this error every now and then while I am running my test configurations. The point to note is, I haven't specified us-west-2d availability zone in any of my configurations. And when I get this error, I do a terraform destroy (to destroy created VPC, subnets, etc.), and then run terraform apply again. On the second time, it completes without any errors.

@antonbabenko
Copy link
Member

This kind of errors usually happens when the subnet is not specified (or not specified with the correct value).

Could you verify that you specify correct subnet? Please include terraform code if the problem persists.

@ghost
Copy link
Author

ghost commented Feb 22, 2019

No I am not, but I am creating the complete tire-2 setup from scratch using terraform configuration and only specifying us-west-2 as the region, and amiID. So I couldn't define the subnet ahead of the run. Does that mean such error could not be suppressed in such use-cases?

@antonbabenko
Copy link
Member

You should reference values from VPC as an argument into this module as specified here - https://github.com/terraform-aws-modules/terraform-aws-ec2-instance/blob/master/examples/basic/main.tf#L62

@ghost
Copy link
Author

ghost commented Feb 22, 2019

This does seem like a better approach. Thanks.

@jakemonton
Copy link

jakemonton commented Jan 7, 2020

Hi, I have the same issue. I'm not sure what you mean with "reference values from VPC as an argument".

I used this https://github.com/terraform-aws-modules/terraform-aws-ec2-instance/blob/master/examples/basic to create the ec2 instances.

@antonbabenko
Copy link
Member

@jakemonton AWS may enable and disable certain types of instances or other resources (eg, when AZ is down, you can't launch resources there) at their discretion.

"reference values from VPC as an argument" means that to make this working you need to set subnet_id and/or other arguments to valid values.

I hope it helps.

@jakemonton
Copy link

@antonbabenko I was able to make it work. It was the subnet_id value. Thank you!

@github-actions
Copy link

github-actions bot commented Nov 9, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 9, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants