-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Example in getting started guide fails because t2.micro requires a VPC #4367
Comments
@WillAbides do you mean on this page? https://terraform.io/intro/getting-started/build.html |
@stack72 Yes, that's the page I meant. Although after going through the rest of the getting started documentation I had to keep substituting the old images for the ones on the current page. |
Hey @WillAbides sorry for that, I changed them all recently in #4330 to try and update the docs, but I clearly overlooked this situation (my account has a default VPC). I'll get this cleaned up |
interesting that we're hitting this at almost the exact same time. I checked the PR above, but it seemed to be changing things to use |
@donwb as the subject of this issue states t2 instances must be launched into a VPC. So, to launch one you need to create or specify a VPC, Subnet, etc which isn't included in the tutorial. I think you're just running into this issue now because the docs recently changed. Maybe the old m1.small instance types will work for you... http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-instances.html |
Just hit this today |
I ran into this exact same issue while trying to get started with terraform. I corrected the issue by switching to an
The error message
|
Attempting to use the above: Example Resourceresource "aws_instance" "example" { 1 error(s) occurred:
Terraform does not automatically rollback in the face of errors. This is using the latest: Terraform v0.7.10 |
Images have different iam codes for each region. Per example, Ubuntu 16.04 in São Paulo-BR has code ami-7379e31f and on Virgina-US has code ami-6edd3078 for the same image. Then if you try launch a image from São Paulo(ami-7379e31f) in Virginia, won't work. |
Same issue. The tutorial is not clear. |
any resolution to this? I have the same problem. |
There's no easy to fix this - it's a moving target of instance types and AMIs - is the existing note not sufficient? I think it's pretty clear but open to ideas to make it clearer. |
sorry, am new to this, but which existing note are you referring to? This link gives 404 error |
This is the example that works for aws: https://github.com/hashicorp/terraform/tree/master/examples/aws-two-tier |
Or, because old aws accounts doesn't have a default VPC, just use the
You must create a VPC with that subnet before. |
Oh, and use
|
It is really sad when the first example in a getting started guide doesn't work. |
I was able to work around the issue by adding a security group ID and subnet ID. Basically, this:
becomes this:
...obviously, replacing my_xxxxxx values with your actual subnet and security group ids So, for documentation, you may want to add an outset that mentions "If you don't have a default VPC created, you may want to also add these two elements to your resource... blah, blah, blah' |
This is still... not really working. I've run into this myself just now. The AMI listed in the example doesn't work and reports back the whole...
|
The below worked for me, but requires creating a VPC and subnet:
|
put a t2.micro on the public internet without adding other infrastructure first hashicorp/terraform#4367
@sinzin91's comment fixed it for me. Really not great when the very first example fails, eh? |
I just hit today, and I believe docs needs to be updated for non VPC users with;
|
I also just hit this issue today. I changed instance type to |
MadOtis comment helped med get past this. But someone should really have a look at the getting starting docs. |
the issue is more than 3 years old and it still has not been fixed 👎 |
I'm in region ap-southeast2 and I had to change it to
might be good to get this info right, for first-time users. |
that issue just hit me |
Same, just hit me June 29, 2019. 3.5 years after issue opened. Granted, it forced me to learn about VPC dependencies, but as others have said, this example should be updated in the documentation. @jamtur01 As @MadOtis and others suggested, a gentle reminder that you may need to create the VPC/subnet/security group before the example works would be nice, perhaps with a link to an example like the one @sinzin91 posted that creates said resources. I think people are still getting stuck on this point... not sure why my default VPC wasn't already up to par, but I had to do manual steps. Thanks for otherwise great docs. PS. It turns out my AWS is old enough that it includes EC2 classic capabilities, so default VPC is not available without having customer support intervene. So if the docs mentioned older accounts need the vpc creation step, rather than default vpc, that would be helpful. Some folks new to terraform might also be new to this limitation as per this thread. |
Hitting this exact problem mid 2019 - why is this issue closed?? |
I think the best solution is: aws-console -> new support issue -> "Regarding: Account and Billing Support" -> "Service: Account" -> "Category: Convert EC2 Classic to VPC". |
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. |
The example in the getting started guide fails because the t2.micro instance requires a VPC and no VPC is specified in the example. I worked around by reverting to t1.micro and the ami listed in this version of the doc.
The text was updated successfully, but these errors were encountered: