{"id":115,"date":"2019-03-31T16:19:00","date_gmt":"2019-03-31T16:19:00","guid":{"rendered":"https:\/\/opstree.com\/blog\/\/2019\/03\/31\/the-closer-you-think-you-are-the-less-youll-actually-see\/"},"modified":"2019-09-18T12:55:46","modified_gmt":"2019-09-18T07:25:46","slug":"the-closer-you-think-you-are-the-less-youll-actually-see","status":"publish","type":"post","link":"https:\/\/opstree.com\/blog\/2019\/03\/31\/the-closer-you-think-you-are-the-less-youll-actually-see\/","title":{"rendered":"The closer you think you are, the less you&#8217;ll actually see"},"content":{"rendered":"<div dir=\"ltr\" style=\"text-align:left;\">\n<div class=\"separator\" style=\"clear:both;text-align:center;\"><\/div>\n<p>I hope you have seen the movie <b>Now you see me<\/b>, it has a famous quote&nbsp;<i style=\"font-weight:bold;\">The closer you think you are, the less you&#8217;ll actually see<\/i>. Well, this blog is not about this movie but how I got stuck into an issue, because I was not paying attention and looking at the things closely and seeing less hence not able to resolve the issue.<\/p>\n<\/div>\n<div dir=\"ltr\" style=\"text-align:left;\">There is a lot happening in today\u2019s DevOps world. And HashiCorp has emerged out to be a big player in this game. Terraform is one of the open source tools to manage <b><i>infrastructure as code<\/i><\/b>. It plays well with most of the cloud provider. But with all these continuous improvements and enhancements there comes a possibility of issues as well. Below article is about such a scenario. And in case you have found yourself in the same trouble. You are lucky to reach the right page.<\/div>\n<div dir=\"ltr\" style=\"text-align:left;\">I was learning terraform and performing a simple task to launch an <b>Ubuntu<\/b> EC2 instance in&nbsp;<b>us-east-1&nbsp;<\/b>region. For which I required the <b>AMI Id,<\/b> which I copied from the AWS console as shown in below screenshot.<\/p>\n<div class=\"separator\" style=\"clear:both;text-align:center;\"><a style=\"margin-left:1em;margin-right:1em;\" href=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/03\/4cf1e-pic1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/03\/4cf1e-pic1.png?w=300\" width=\"400\" height=\"141\" border=\"0\"><\/a><\/div>\n<p class=\"MsoNormal\">Once I got the AMI Id, I tried to create the instance using terraform, below is the screenshot of the code<\/p>\n<div class=\"MsoNormal\" style=\"background:#1E1E1E;line-height:14.25pt;margin-bottom:0;\">provider &#8220;aws&#8221; {<\/div>\n<div class=\"MsoNormal\" style=\"background:#1E1E1E;line-height:14.25pt;margin-bottom:0;\">&nbsp;&nbsp;region&nbsp;&nbsp;&nbsp;&nbsp; = &#8220;us-east-1&#8221;<\/div>\n<div class=\"MsoNormal\" style=\"background:#1E1E1E;line-height:14.25pt;margin-bottom:0;\">&nbsp;&nbsp;access_key = &#8220;XXXXXXXXXXXXXXXXXX&#8221;<\/div>\n<div class=\"MsoNormal\" style=\"background:#1E1E1E;line-height:14.25pt;margin-bottom:0;\">&nbsp; secret_key = &#8220;XXXXXXXXXXXXXXXXXXX&#8221;<\/div>\n<div class=\"MsoNormal\" style=\"background:#1E1E1E;line-height:14.25pt;margin-bottom:0;\">}<\/div>\n<div class=\"MsoNormal\" style=\"background:#1E1E1E;line-height:14.25pt;margin-bottom:0;\"><\/div>\n<div class=\"MsoNormal\" style=\"background:#1E1E1E;line-height:14.25pt;margin-bottom:0;\">resource &#8220;aws_instance&#8221; &#8220;sandy&#8221; {<\/div>\n<div class=\"MsoNormal\" style=\"background:#1E1E1E;line-height:14.25pt;margin-bottom:0;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;ami = &#8220;<span style=\"background:yellow;\">ami-036ede09922dadc9b<\/span>&#8220;<\/div>\n<div class=\"MsoNormal\" style=\"background:#1E1E1E;line-height:14.25pt;margin-bottom:0;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; instance_type = &#8220;t2.micro&#8221;<\/div>\n<div class=\"MsoNormal\" style=\"background:#1E1E1E;line-height:14.25pt;margin-bottom:0;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; subnet_id = &#8220;subnet-0bf4261d26b8dc3fc&#8221;<\/div>\n<div class=\"MsoNormal\" style=\"background:#1E1E1E;line-height:14.25pt;margin-bottom:0;\">}<\/div>\n<div class=\"MsoNormal\">I was expecting to see the magic of Terraform but what I got below ugly error.<\/p>\n<\/div>\n<div class=\"MsoNormal\">\n<div class=\"separator\" style=\"clear:both;text-align:center;\"><a style=\"margin-left:1em;margin-right:1em;\" href=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/03\/2dd59-screen2bshot2b2019-03-312bat2b7.19.102bpm.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/03\/2dd59-screen2bshot2b2019-03-312bat2b7.19.102bpm.png?w=300\" width=\"400\" height=\"80\" border=\"0\"><\/a><\/div>\n<div class=\"separator\" style=\"clear:both;text-align:left;\"><\/div>\n<p>Terraform was not allowing to spin up the instance. I tried couple of things which didn\u2019t work. As you can see the error message didn&#8217;t give too much information. Finally, I thought of giving it a try by&nbsp; doing same task via AWS web console. I searched for the same ubuntu AMI and selected the image as shown below. Rest of the things, I kept to default. And well, this time it got launched.<\/p>\n<\/div>\n<div class=\"separator\" style=\"clear:both;text-align:center;\"><a style=\"margin-left:1em;margin-right:1em;\" href=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/03\/d9cd1-pic2.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/03\/d9cd1-pic2.png?w=300\" width=\"400\" height=\"142\" border=\"0\"><\/a><\/div>\n<p>And it confused me more. Through console, it was working fine but while using Terraform it says not allowed. After a lot of hair pulling finally, I found the culprit which is a perfect example of how overlooking small things can lead to blunder.<\/p>\n<h3 style=\"text-align:left;\">Culprit<\/h3>\n<div>While copying the AMI ID from AWS console, I had copied the 64-bit (ARM) AMI ID. Please look carefully, the below screenshot<\/p>\n<div class=\"separator\" style=\"clear:both;text-align:center;\"><a style=\"margin-left:1em;margin-right:1em;text-align:center;\" href=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/03\/6ba5c-pic3.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/03\/6ba5c-pic3.png?w=300\" width=\"400\" height=\"152\" border=\"0\"><\/a><\/div>\n<div class=\"separator\" style=\"clear:both;text-align:center;\"><\/div>\n<\/div>\n<div class=\"MsoNormal\"><!-- [if gte vml 1]&gt; &lt;![endif]--><!-- [if !vml]--><!--[endif]--><\/div>\n<div class=\"MsoNormal\">But while creating it through console I was selecting the default configuration which by is 64-bit(x86). Look at the below screenshot.<\/p>\n<\/div>\n<div class=\"separator\" style=\"clear:both;text-align:center;\"><a style=\"margin-left:1em;margin-right:1em;\" href=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/03\/754d5-pic4.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/03\/754d5-pic4.png?w=300\" width=\"400\" height=\"132\" border=\"0\"><\/a><\/div>\n<div class=\"MsoNormal\">To explain it further, I tried to launch the VM with 64-bit (ARM) manually. And while selecting the AMI, I selected the 64-bit (ARM).<\/p>\n<\/div>\n<div class=\"separator\" style=\"clear:both;text-align:center;\"><a style=\"margin-left:1em;margin-right:1em;\" href=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/03\/599d6-pic5.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/03\/599d6-pic5.png?w=300\" width=\"400\" height=\"56\" border=\"0\"><\/a><\/div>\n<div class=\"MsoNormal\">And here is the culprit. 64-bit(ARM) only supports a1 instance type<\/p>\n<div class=\"separator\" style=\"clear:both;text-align:center;\"><a style=\"margin-left:1em;margin-right:1em;text-align:center;\" href=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/03\/db6ea-pic6.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/03\/db6ea-pic6.png?w=300\" width=\"400\" height=\"116\" border=\"0\"><\/a><\/div>\n<h3 style=\"text-align:left;\">Conclusion<\/h3>\n<div>\n<p>While launching the instance with the terraform, I tried using 64-bit (ARM) AMI ID mistakenly, primarily because for same AMI there are 2 AMI IDs and it is not very visible to eyes unless you pay special attention.<\/p>\n<p>So folks, next time choosing an AMI ID keep it in mind what type of AMI you are selecting. It will save you a lot of time.<\/p>\n<\/div>\n<div><\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I hope you have seen the movie Now you see me, it has a famous quote&nbsp;The closer you think you are, the less you&#8217;ll actually see. Well, this blog is not about this movie but how I got stuck into an issue, because I was not paying attention and looking at the things closely and &hellip; <a href=\"https:\/\/opstree.com\/blog\/2019\/03\/31\/the-closer-you-think-you-are-the-less-youll-actually-see\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;The closer you think you are, the less you&#8217;ll actually see&#8221;<\/span><\/a><\/p>\n","protected":false},"author":171775670,"featured_media":29900,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[1],"tags":[768739294,768739308,676319247,59002157,3021235],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/11\/DevSecOps-1.jpg","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pfDBOm-1R","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/115"}],"collection":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/users\/171775670"}],"replies":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/comments?post=115"}],"version-history":[{"count":4,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/115\/revisions"}],"predecessor-version":[{"id":981,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/115\/revisions\/981"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media\/29900"}],"wp:attachment":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media?parent=115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/categories?post=115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/tags?post=115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}