{"id":152,"date":"2020-06-09T23:32:47","date_gmt":"2020-06-09T23:32:47","guid":{"rendered":"https:\/\/oqtacore.com\/app2\/?p=152"},"modified":"2026-05-04T09:43:05","modified_gmt":"2026-05-04T09:43:05","slug":"what-is-terraform","status":"publish","type":"post","link":"https:\/\/oqtacore.com\/blog\/what-is-terraform\/","title":{"rendered":"What is Terraform?"},"content":{"rendered":"<h2><span class=\"ez-toc-section\" id=\"Why_Infrastructure_as_Code_Matters\"><\/span>Why Infrastructure as Code Matters<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If you check our website, you will find a Tech article about AWS. AWS is a great tool for controlling costs, especially for larger projects in which there is a need for a special person just for infrastructure \u2013 AWS allows not to hire such person and continue using distributed computing power that is maintained by highly qualified Amazon staff, that is probably much better than a small startup can ever find and afford to pay for.<\/p>\n<p>If you are a real tech guy that cares about stable work of the business, one of the first questions while deploying to AWS is \u201cHow do we duplicate our infrastructure between dev\/qa\/prod?\u201d.<\/p>\n<p>Especially when your infrastructure consists of hundreds if not thousands of blocks (it is very possible, since every function is a separate Lambda than needs roles, etc).<\/p>\n<p>The approach which allows to keep the whole infrastructure as metadata is called <strong>Infrastructure as a Code (IaaC)<\/strong>.<\/p>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-163 size-full\" src=\"https:\/\/oqtacore.com\/app2\/wp-content\/uploads\/2020\/11\/2020-06-09_13-26-43.png\" alt=\"Infrastructure as a Code\" width=\"510\" height=\"651\" srcset=\"https:\/\/oqtacore.com\/blog\/wp-content\/uploads\/2020\/11\/2020-06-09_13-26-43.png 510w, https:\/\/oqtacore.com\/blog\/wp-content\/uploads\/2020\/11\/2020-06-09_13-26-43-235x300.png 235w, https:\/\/oqtacore.com\/blog\/wp-content\/uploads\/2020\/11\/2020-06-09_13-26-43-180x230.png 180w\" sizes=\"auto, (max-width: 510px) 100vw, 510px\" \/><\/figure>\n<p>If you have your infrastructure in IaaC script format, you can redeploy it a thousand times automatically. If you don\u2019t have such script \u2013 you have to deploy thousands of blocks in each environment <strong>manually<\/strong>. That\u2019s a no-brainer.<\/p>\n<p>One another great thing with IaaC is that if you modify the script of the infrastructure, it will not recreate the whole existing infrastructure, but only calculate the differences between the current and desired state, and apply just the small needed touches so that you have the final version.<\/p>\n<p>Amazon has thought of it and has their own technology called CloudFormation. It works, but it is slow to support new features.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"What_Terraform_Does\"><\/span>What Terraform Does<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>One of the best 3rd party solutions is terraform. It supports new AWS features even faster than Amazon\u2019s own Cloudformation, but also terraform supports tens of other providers, such as Google Cloud, Github, Azure and many more. All those providers can be handled in the same script! So it really gives you control over the ever-growing complexity of your project.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Terraform_State_Management\"><\/span>Terraform State Management<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>And we shouldn\u2019t talk only about script, we should talk also about state (the file with which you store the existing infrastructure). With CloudFormation, you will have a separate state file for each provider. With terraform, you have just one. That\u2019s the final deal breaker!<\/p>\n<p>So, that\u2019s why terraform is often preferred to just AWS CloudFormation.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-164 size-full\" src=\"http:\/\/blog.oqtacore.com\/wp-content\/uploads\/2020\/11\/2020-06-09_13-26-09.png\" alt=\"Terraform providers \" width=\"912\" height=\"582\" srcset=\"https:\/\/oqtacore.com\/blog\/wp-content\/uploads\/2020\/11\/2020-06-09_13-26-09.png 912w, https:\/\/oqtacore.com\/blog\/wp-content\/uploads\/2020\/11\/2020-06-09_13-26-09-300x191.png 300w, https:\/\/oqtacore.com\/blog\/wp-content\/uploads\/2020\/11\/2020-06-09_13-26-09-768x490.png 768w, https:\/\/oqtacore.com\/blog\/wp-content\/uploads\/2020\/11\/2020-06-09_13-26-09-180x115.png 180w, https:\/\/oqtacore.com\/blog\/wp-content\/uploads\/2020\/11\/2020-06-09_13-26-09-800x511.png 800w\" sizes=\"auto, (max-width: 912px) 100vw, 912px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Why Infrastructure as Code Matters If you check our website, you will find a Tech article about AWS. AWS is a great tool for controlling costs, especially for larger projects in which there is a need for a special person just for infrastructure \u2013 AWS allows not to hire such person and continue using distributed [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_mo_disable_npp":"","yasr_overall_rating":0,"yasr_post_is_review":"","yasr_auto_insert_disabled":"","yasr_review_type":"","footnotes":""},"categories":[2],"tags":[],"class_list":["post-152","post","type-post","status-publish","format-standard","hentry","category-featured-articles"],"acf":{"image":165},"yasr_visitor_votes":{"number_of_votes":0,"sum_votes":0,"stars_attributes":{"read_only":false,"span_bottom":false}},"_links":{"self":[{"href":"https:\/\/oqtacore.com\/blog\/wp-json\/wp\/v2\/posts\/152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oqtacore.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oqtacore.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oqtacore.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oqtacore.com\/blog\/wp-json\/wp\/v2\/comments?post=152"}],"version-history":[{"count":5,"href":"https:\/\/oqtacore.com\/blog\/wp-json\/wp\/v2\/posts\/152\/revisions"}],"predecessor-version":[{"id":2325,"href":"https:\/\/oqtacore.com\/blog\/wp-json\/wp\/v2\/posts\/152\/revisions\/2325"}],"wp:attachment":[{"href":"https:\/\/oqtacore.com\/blog\/wp-json\/wp\/v2\/media?parent=152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oqtacore.com\/blog\/wp-json\/wp\/v2\/categories?post=152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oqtacore.com\/blog\/wp-json\/wp\/v2\/tags?post=152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}