{"id":4876,"date":"2020-05-18T14:59:02","date_gmt":"2020-05-18T12:59:02","guid":{"rendered":"https:\/\/www.codemotion.com\/magazine\/?p=4876"},"modified":"2022-01-05T20:05:15","modified_gmt":"2022-01-05T19:05:15","slug":"infrastructure-as-code","status":"publish","type":"post","link":"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/","title":{"rendered":"Infrastructure as Code"},"content":{"rendered":"\t\t\t\t<div class=\"wp-block-uagb-table-of-contents uagb-toc__align-left uagb-toc__columns-1  uagb-block-224699e7-8a33-4d37-896e-16788fadf273      \"\n\t\t\t\t\tdata-scroll= \"1\"\n\t\t\t\t\tdata-offset= \"30\"\n\t\t\t\t\tstyle=\"\"\n\t\t\t\t>\n\t\t\t\t<div class=\"uagb-toc__wrap\">\n\t\t\t\t\t\t<div class=\"uagb-toc__title\">\n\t\t\t\t\t\t\tTable Of Contents\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"uagb-toc__list-wrap \">\n\t\t\t\t\t\t<ol class=\"uagb-toc__list\"><li class=\"uagb-toc__list\"><a href=\"#infrastructure-as-code\" class=\"uagb-toc-link__trigger\">Infrastructure as Code<\/a><li class=\"uagb-toc__list\"><a href=\"#popular-iac-solutions\" class=\"uagb-toc-link__trigger\">Popular IaC solutions<\/a><li class=\"uagb-toc__list\"><a href=\"#software-defined-networking\" class=\"uagb-toc-link__trigger\">Software-defined networking<\/a><li class=\"uagb-toc__list\"><a href=\"#software-defined-data-center\" class=\"uagb-toc-link__trigger\">Software-defined data center<\/a><li class=\"uagb-toc__list\"><a href=\"#ibm-cloud-schematics\" class=\"uagb-toc-link__trigger\">IBM Cloud Schematics<\/a><li class=\"uagb-toc__list\"><a href=\"#example-a-multi-zone-three-vpcs-network\" class=\"uagb-toc-link__trigger\">Example: A Multi-zone three-VPC\u2019s network<\/a><li class=\"uagb-toc__list\"><a href=\"#terraform-code\" class=\"uagb-toc-link__trigger\">Terraform code<\/a><li class=\"uagb-toc__list\"><a href=\"#more-case-studies\" class=\"uagb-toc-link__trigger\">More case studies<\/a><\/ol>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\n\n\n<h2 class=\"wp-block-heading\">Infrastructure as Code<\/h2>\n\n\n\n<p><span id=\"urn:enhancement-69c7b7a9\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/infrastructure\">Infrastructure<\/span> as Code (IaC) uses a <span id=\"urn:enhancement-b99babea\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/high-level_programming_language\">high-level<\/span> descriptive coding language to <strong>automate the provisioning of IT infrastructure<\/strong>. This automation eliminates the need for <span id=\"urn:enhancement-8cb35b68\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/software_developer\">developers<\/span> to manually provision and manage <span id=\"urn:enhancement-422a10a9\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/server_computing\">servers<\/span>, <span id=\"urn:enhancement-970ed087\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/operating_system\">operating systems<\/span>, <span id=\"urn:enhancement-4c77f0db\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/database\">databases<\/span>, and other elements that traditionally need to be set up almost from scratch every time they want to develop, test, or <span id=\"urn:enhancement-ca7ef646\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/software_deployment\">deploy<\/span> an application.IaC is also <strong>an essential <\/strong><a href=\"https:\/\/www.ibm.com\/cloud\/learn\/devops-a-complete-guide\"><strong>DevOps<\/strong><\/a><strong> practice<\/strong>, indispensable to a competitively paced <span id=\"urn:enhancement-341244c1\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/software_deployment\">software delivery<\/span> lifecycle. It enables <span id=\"urn:enhancement-d89dcfae\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/devops\">DevOps<\/span> teams to rapidly create and <span id=\"urn:enhancement-ff6296bb\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/software_versioning\">version<\/span> infrastructure in the same way they <span id=\"urn:enhancement-1951ee7e\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/software_versioning\">version<\/span> <span id=\"urn:enhancement-8422a50e\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/source_code\">source code<\/span> and to track these <span id=\"urn:enhancement-253b648d\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/software_versioning\">versions<\/span> to avoid inconsistency among IT environments that can lead to serious issues during <span id=\"urn:enhancement-8fd64a39\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/software_deployment\">deployment<\/span>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Declarative Vs. Imperative<\/h3>\n\n\n\n<p>There are generally two approaches to IaC:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>declarative (functional)<\/li><li>imperative (procedural)<\/li><\/ul>\n\n\n\n<p>The difference between the declarative and the imperative approaches is essentially <em>what <\/em>versus <em>how<\/em>.<\/p>\n\n\n\n<p>The <strong>declarative<\/strong> approach focuses on what the eventual target configuration should be. It allows to define the desired state, and based on that the system executes what needs to happen to achieve that desired state.&nbsp;The <strong>imperative<\/strong> approach focuses on how the <span id=\"urn:enhancement-8266b502\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/infrastructure\">infrastructure<\/span> is to be changed to meet this. Specific commands must be <span id=\"urn:enhancement-680d982\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/execution_computing\">executed<\/span> in the desired order to get the wanted conclusion.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Immutable infrastructure vs. mutable infrastructure<\/h3>\n\n\n\n<p>An important decision to make when automating <span id=\"urn:enhancement-53550741\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/infrastructure\">infrastructure<\/span> with IaC is whether to establish <strong>mutable<\/strong> or <strong>immutable<\/strong> <span id=\"urn:enhancement-77763de0\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/infrastructure\">infrastructure<\/span>.<\/p>\n\n\n\n<p><strong>Mutable <span id=\"urn:enhancement-50ebdfe8\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/infrastructure\">infrastructure<\/span><\/strong><em> <\/em>can be modified or updated after it is originally provisioned. This approach gives development teams the flexibility to make ad hoc <span id=\"urn:enhancement-a6c3dc7f\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/server_computing\">server<\/span> customizations to, say, more closely fit development and <span id=\"urn:enhancement-f98e5fcb\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">application<\/span> requirements, or to promptly respond to an emergent security issue. On the other hand, it also undermines a key IaC benefit, which is the ability to maintain consistency between deployments or within versions. This drawback can make <span id=\"urn:enhancement-e8e65b16\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/infrastructure\">infrastructure<\/span> <span id=\"urn:enhancement-cefd5e85\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/software_versioning\">version<\/span> tracking much more difficult.For these reasons, most IaC is implemented as an <strong>immutable <span id=\"urn:enhancement-afd9bb0a\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/infrastructure\">infrastructure<\/span><\/strong>, which cannot be modified once originally provisioned. If immutable <span id=\"urn:enhancement-8dbb524d\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/infrastructure\">infrastructure<\/span> needs to be changed, it has to be replaced with new <span id=\"urn:enhancement-ab7b10c0\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/infrastructure\">infrastructure<\/span>. Because new <span id=\"urn:enhancement-1369e679\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/infrastructure\">infrastructure<\/span> can be spun up quickly on the cloud\u2014particularly with IaC\u2014immutable <span id=\"urn:enhancement-d6fc51f4\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/infrastructure\">infrastructure<\/span> is much more feasible and practical than it sounds.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">The benefits of Infrastructure as Code&nbsp;<\/h3>\n\n\n\n<p>IaC allows the orchestration of various kinds of cloud resources, including both on-premises (up to VMs on <span id=\"urn:enhancement-dc147a1\" class=\"textannotation disambiguated wl-organization\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/vmware\">VMWare<\/span> vSphere) and <span id=\"urn:enhancement-550abdb9\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/open_source\">open source<\/span> environments.<\/p>\n\n\n\n<p>Among the key benefits, there are faster time to production\/market, improved consistency, faster and more efficient development, protection against churn, all with lower <span style=\"user-select: auto;\" id=\"urn:enhancement-744e97dd\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/cost\">costs<\/span>, and an improved ROI.<\/p>\n\n\n\n<div class=\"uagb-cta__outer-wrap uagb-block-c6c36b8c-cb5b-4fc8-ba4f-5cb86a96eb08\"><div class=\"uagb-cta__content-wrap uagb-cta__block uagb-cta__icon-position-right uagb-cta__content-right uagb-cta__content-stacked-tablet uagb-cta__button-valign-middle \"><div class=\"uagb-cta__left-right-wrap\"><div class=\"uagb-cta__content\"><div class=\"uagb-cta__title-wrap\"><h3 class=\"uagb-cta__title\">Join the API Economy<\/h3><\/div><div class=\"uagb-cta-text-wrap\"><p class=\"uagb-cta__desc\">There are far easier ways to deploy your product than having to do it all on your own like in the old days. The distance between code and production has finally shrunk. Learn how to deploy an application through the IBM Cloud Platform, by means of Red Hat OpenShift.<\/p><\/div><\/div><div class=\"uagb-cta__link-wrapper uagb-cta__block-link-style\"><div class=\"uagb-cta__button-wrapper\"><a href=\"https:\/\/ibm.co\/3628Ftl\" class=\"uagb-cta__block-link uagb-cta__button-link-wrapper uagb-cta-typeof-button\" target=\"_blank\" rel=\"noopener noreferrer\"><span class=\"uagb-cta__link-content-inner\"><span>IBM Cloud<\/span><\/span><\/a><\/div><\/div><\/div><\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Popular IaC solutions<\/h2>\n\n\n\n<p>Many solutions are on the market to provision network components through a software description. Among them, it is worth to mention Terraform, <span id=\"urn:enhancement-741d6766\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/ibm\">IBM<\/span> <span id=\"urn:enhancement-4043dd66\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/cloud_computing\">Cloud<\/span> Schematics, <span id=\"urn:enhancement-86d974db\" class=\"textannotation disambiguated wl-creative-work\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/amazon_web_services\">AWS<\/span> CloudFormation, <span id=\"urn:enhancement-5891ef9\" class=\"textannotation disambiguated wl-organization\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/google\">Google<\/span> <span id=\"urn:enhancement-37ef9ce9\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/cloud_computing\">Cloud<\/span> Deployment Manager, Chef Infra, <span id=\"urn:enhancement-aa420bc7\" class=\"textannotation disambiguated wl-organization\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/red_hat\">Red Hat<\/span> Ansible Tower, Cdist, StackStorm, <span id=\"urn:enhancement-e80877ed\" class=\"textannotation disambiguated wl-creative-work\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/cfengine\">CFEngine<\/span>, Pulumi, Otter, <span id=\"urn:enhancement-9be03998\" class=\"textannotation disambiguated wl-creative-work\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/cfengine\">CFEngine<\/span>, DSC, and Paco. Each of them takes care of a certain number of steps inside the overall process.<\/p>\n\n\n\n<p>A comparison chart of the aforementioned solutions is available below:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"509\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image7-2-1024x509.png\" alt=\"Infrastructure as Code: comparison chart\" class=\"wp-image-4884\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image7-2-1024x509.png 1024w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image7-2-300x149.png 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image7-2-768x382.png 768w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image7-2.png 1432w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Software-defined networking<\/h2>\n\n\n\n<p>In the context of IaC, it is interesting to introduce another interesting possibility, know as <strong>software-defined networking<\/strong>. It is an approach that uses software to define network elements, connecting them, and provisioning the needed resources. This approach helps software <span id=\"urn:enhancement-da1e491f\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/software_developer\">developers<\/span> to directly <span id=\"urn:enhancement-e2eac465\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/implementation\">implement<\/span> an <span id=\"urn:enhancement-7ddb44a5\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/infrastructure\">infrastructure<\/span> with <span id=\"urn:enhancement-f6dc1a9b\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/source_lines_of_code\">lines of code<\/span>, when not using pre-defined templates. Some SDN frameworks allow for orchestrating both <span id=\"urn:enhancement-b2d21306\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/open_source\">open-source<\/span> and on-prem resources.<\/p>\n\n\n\n<p>You can know more about SDN watching this video.<\/p>\n\n\n\n<figure class=\"wp-block-embed-youtube aligncenter wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Terraform Explained\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube-nocookie.com\/embed\/HmxkYNv1ksg?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Software-defined data center<\/h2>\n\n\n\n<p>Now that we know what software-defined networking means, we want to learn <strong>how to <span id=\"urn:enhancement-127606fd\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/implementation\">implement<\/span> a full <span id=\"urn:enhancement-d67ae860\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/data\">data<\/span> center through its software description<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What is a Software-defined Data Center?<\/h3>\n\n\n\n<p>A <span id=\"urn:enhancement-e1812c2\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/software\">Software<\/span>-Defined <span id=\"urn:enhancement-8103e9ba\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/data_center\">Data Center<\/span> (SDDC) results from years of evolution in <span id=\"urn:enhancement-a64db7c\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/server_computing\">server<\/span> <span id=\"urn:enhancement-2f23458f\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/virtualization\">virtualization<\/span>. It extends <span id=\"urn:enhancement-6d3d1306\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/virtualization\">virtualization<\/span> from <span id=\"urn:enhancement-5135a54e\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/computing\">computing<\/span> to storage and networking resources, providing a single software toolset to manage those <span id=\"urn:enhancement-8ae396ad\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/virtualization\">virtualized<\/span> resources. Plus, the SDDC enables policy-driven automation of provisioning and management, which speeds the delivery of resources and enhances efficiency.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">SDDC Components<\/h3>\n\n\n\n<p>The SDDC combines three kinds of virtualizations, about <span id=\"urn:enhancement-2aa6e05c\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/computing\">compute<\/span>, storage, and networking resources. Let\u2019s give a shot look at each of them.<\/p>\n\n\n\n<p><strong><span id=\"urn:enhancement-f4f5fd5f\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/computing\">Compute<\/span> <span id=\"urn:enhancement-6ee67e35\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/virtualization\">virtualization<\/span><\/strong>, or <span id=\"urn:enhancement-62d9712a\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/server_computing\">server<\/span> <span id=\"urn:enhancement-23f3e145\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/virtualization\">virtualization<\/span>, improve resource usage. <span id=\"urn:enhancement-5f2bf622\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/virtualization\">Virtualization<\/span> abstracts operating systems and <span id=\"urn:enhancement-ab5198d8\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">applications<\/span> from physical <span id=\"urn:enhancement-1eb4d602\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/server_computing\">servers<\/span> through a hypervisor. Virtual machines can be used to <span id=\"urn:enhancement-de2a3e2a\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/execution_computing\">run<\/span> multiple, distinct <span id=\"urn:enhancement-47ed30\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/application_software\">applications<\/span> and <span id=\"urn:enhancement-47fb0a87\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/operating_system\">operating systems<\/span> on a single <span id=\"urn:enhancement-74469edf\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/server_computing\">server<\/span>.&nbsp;<\/p>\n\n\n\n<p><strong>Storage <span id=\"urn:enhancement-c63ea25d\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/virtualization\">virtualization<\/span><\/strong> pools resources too, and optimizes their usage. Virtualized <span id=\"urn:enhancement-892b7f37\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/storage_memory\">storage<\/span> improves flexibility and <span id=\"urn:enhancement-79cd068e\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/scalability\">scalability<\/span> because you can provision <span id=\"urn:enhancement-3f42ed44\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/storage_memory\">storage<\/span> from the pool, without having the need to purchase new capacity. With virtualized <span id=\"urn:enhancement-ebae801\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/storage_memory\">storage<\/span>, you can also allocate <span id=\"urn:enhancement-cac6682f\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/storage_memory\">storage<\/span> dynamically, on-demand.<\/p>\n\n\n\n<p><strong>Network <span id=\"urn:enhancement-6c0c7661\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/virtualization\">virtualization<\/span><\/strong> enables you to provision and manages networks independently of the physical hardware. That abstraction of resources decreases provisioning time and enhances flexibility, allowing you to more easily move <span id=\"urn:enhancement-c84dc6e9\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/workload\">workloads<\/span> across <span id=\"urn:enhancement-59f3fce4\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/data\">data<\/span> centers without physical constraints. The right network <span id=\"urn:enhancement-c49057b2\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/virtualization\">virtualization<\/span> solution will also incorporate security capabilities to safeguard networks and isolate <span id=\"urn:enhancement-8cc0b654\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/workload\">workloads<\/span>.<\/p>\n\n\n\n<p>The SDDC integrates these <span id=\"urn:enhancement-1f49d009\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/virtualization\">virtualization<\/span> layers, creating a single, hyperconverged environment that facilitates the delivery of IT resources as a service, regardless of being deployed in a private, public, or hybrid cloud environment. A single management platform standardizes management across the <span id=\"urn:enhancement-85ef3a2c\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/virtualization\">virtualization<\/span> layers and enables policy-based automation that simplifies operations.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">IBM Cloud Schematics<\/h2>\n\n\n\n<p>With <strong><span id=\"urn:enhancement-d269e259\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/ibm\">IBM<\/span> <span id=\"urn:enhancement-ffa8794d\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/cloud_computing\">Cloud<\/span> <span id=\"urn:enhancement-1b99fb7f\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/schematic\">Schematics<\/span><\/strong>, you can organize your <span id=\"urn:enhancement-16a4f15a\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/ibm\">IBM<\/span> <span id=\"urn:enhancement-65480f9d\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/cloud_computing\">Cloud<\/span> resources across environments by using workspaces. Every workspace can be connected to a <span id=\"urn:enhancement-ea9a2a38\" class=\"textannotation disambiguated wl-creative-work\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/github\">GitHub<\/span> repository that contains a set of Terraform <span id=\"urn:enhancement-655eeae2\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/computer_configuration\">configuration<\/span> files, which build a Terraform template. You can choose to create your own Terraform template or use one of the pre-defined templates that are provided by <span id=\"urn:enhancement-a3364cba\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/ibm\">IBM<\/span> (see <a href=\"https:\/\/github.com\/Cloud-Schematics\" target=\"_blank\" aria-label=\" (opens in a new tab)\" rel=\"noreferrer noopener nofollow\" class=\"ek-link\">this link<\/a>). Workspaces allow for the separation of concerns for cloud resources and can be individually managed with <span id=\"urn:enhancement-d82ebf5\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/ibm\">IBM<\/span> <span id=\"urn:enhancement-6f060a73\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/cloud_computing\">Cloud<\/span> <span id=\"urn:enhancement-7114c86a\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/identity_management\">Identity and Access Management<\/span>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Infrastructure as Code and IBM<\/h3>\n\n\n\n<p><a aria-label=\" (opens in a new tab)\" href=\"https:\/\/www.ibm.com\/cloud\/blog\/announcements\/ibm-cloud-schematics-enabling-infrastructure-as-code\" target=\"_blank\" rel=\"noreferrer noopener nofollow\" class=\"ek-link\">Schematics<\/a> is <a href=\"https:\/\/www.codemotion.com\/magazine\/dev-hub\/cloud-manager\/ibm-cloud-code-to-production-with-no-manual-deployment\/\">IBM Cloud<\/a>\u2019s solution for automating <span id=\"urn:enhancement-dee9bdf3\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/infrastructure\">infrastructure<\/span> management with consistent provisioning and orchestration. Built on Terraform, <span id=\"urn:enhancement-93b22d97\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/ibm\">IBM<\/span> <span id=\"urn:enhancement-a0e11d5d\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/cloud_computing\">Cloud<\/span> <span id=\"urn:enhancement-82b7f59a\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/schematic\">Schematics<\/span> features an easy-to-use <span id=\"urn:enhancement-fa20f68b\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/graphical_user_interface\">graphical interface<\/span> to manage the entire <span id=\"urn:enhancement-e809e1d2\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/infrastructure\">infrastructure<\/span> <span id=\"urn:enhancement-443b5652\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/stack_abstract_data_type\">stack<\/span> across multiple platforms. Pre-built templates allow <span id=\"urn:enhancement-151b0e82\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/software_developer\">developers<\/span> to easily replicate or update environments and implement version control across the entire <span id=\"urn:enhancement-834e21fb\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/organization\">organization<\/span>. It is worth noting that Terraform can be defined as a safe workflow across providers and the <span id=\"urn:enhancement-1faaee46\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/community\">community<\/span> around it prevents vendor locking.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Creating your IBM Cloud account<\/h3>\n\n\n\n<p>To work on <span id=\"urn:enhancement-ccc6a66e\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/ibm\">IBM<\/span> <span id=\"urn:enhancement-d527a183\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/cloud_computing\">Cloud<\/span> <span id=\"urn:enhancement-3163edc6\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/schematic\">Schematics<\/span>, sign up for an <span id=\"urn:enhancement-b874f041\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/ibm\">IBM<\/span> ID and <a href=\"https:\/\/cloud.ibm.com\/registration\"><strong>create your IBM Cloud account<\/strong><\/a>. It\u2019s <strong><span id=\"urn:enhancement-903fba69\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/free_software\">free<\/span><\/strong> for many features, allowing you to do real things and understand how to make real business choices on it.You can access all <span id=\"urn:enhancement-6d3be173\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/free_software\">free<\/span> examples listed in the <a href=\"https:\/\/www.github.com\/cloud-schematics\/\">IBM Cloud\u2019s Github page<\/a>. These sample templates have been made freely available on <span id=\"urn:enhancement-34c85c6c\" class=\"textannotation disambiguated wl-creative-work\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/github\">Github<\/span>.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"554\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image17-1024x554.png\" alt=\"Infrastracture as Code: IBM Cloud Terraform templates\" class=\"wp-image-4894\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image17-1024x554.png 1024w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image17-300x162.png 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image17-768x415.png 768w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image17-1536x831.png 1536w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image17.png 1817w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<p>Let us see how easy it is to use <span id=\"urn:enhancement-48a58c22\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/ibm\">IBM<\/span> <span id=\"urn:enhancement-1a9d438a\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/schematic\">Schematics<\/span> on the <span id=\"urn:enhancement-3f73a559\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/ibm\">IBM<\/span> <span id=\"urn:enhancement-53741a95\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/cloud_computing\">Cloud<\/span> to implement virtual networks and provision them.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Example: A Multi-zone three-VPC\u2019s network<\/h2>\n\n\n\n<p>We\u2019re gonna implement a three-element VPC network. You can see the proposed architecture on the diagram shown below.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"638\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image8-1-1024x638.png\" alt=\"Infrastructure as Code: VPC Workspace\" class=\"wp-image-4885\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image8-1-1024x638.png 1024w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image8-1-300x187.png 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image8-1-768x479.png 768w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image8-1.png 1083w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Accessing IBM Schematics<\/h3>\n\n\n\n<p><span id=\"urn:enhancement-dc818c1\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/schematic\">Schematics<\/span> is one of the functions of the <span id=\"urn:enhancement-dac404a8\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/ibm\">IBM<\/span> <span id=\"urn:enhancement-7ff33584\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/cloud_computing\">Cloud<\/span> framework. You can access it clicking on the four-bar icon (left-top of the home page) and then on <em><span id=\"urn:enhancement-d693620f\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/schematic\">Schematics<\/span><\/em>.<\/p>\n\n\n\n<p>You\u2019ll need three things to work on this <span id=\"urn:enhancement-7af10e64\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/project\">project<\/span>: your <span id=\"urn:enhancement-39754d39\" class=\"textannotation disambiguated wl-creative-work\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/github\">Github<\/span> page, an <span id=\"urn:enhancement-a6916704\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/ibm\">IBM<\/span> <span id=\"urn:enhancement-ed00977a\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/cloud_computing\">Cloud<\/span> access, and the <span id=\"urn:enhancement-88d4da26\" class=\"textannotation disambiguated wl-creative-work\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/github\">Github<\/span> page address for one or more <span id=\"urn:enhancement-a52c51da\" class=\"textannotation disambiguated wl-thing\" itemid=\"http:\/\/data.wordlift.io\/wl01770\/entity\/ibm\">IBM<\/span> IaC examples.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Getting a Personal Access Token<\/h3>\n\n\n\n<p>You are a developer, so let\u2019s assume you already have your Github page. You\u2019ll need a Personal Access Token (PAT) to access private repositories. You most probably know how to get it, but just in case you\u2019re brand new to it, let\u2019s recap how to get it.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Open your Github page<\/li><li>Click on your name\u2019s icon (right-top)<\/li><li>Click on <em>Settings<\/em><\/li><li>On the new screen, locate the options list at the screen left and choose <em>Developer settings<\/em><\/li><li>A new left options bar shows up: select <em>Personal Access Token<\/em><\/li><li>On the new screen, some underlined words appear. Just click on <em>Generate<\/em>;<\/li><li>In the <em>Note<\/em> textbook, give a name to this PAT (it is \u201cschematics_ex1\u201d in our example);<\/li><li>Ask more specs checking on the suggested options (not mandatory)<\/li><\/ul>\n\n\n\n<p>Go to the end of the page and click on <em>Generate token<\/em>.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"346\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image14-1024x346.png\" alt=\"Infrastructure as Code: Getting a Personal Access Token\" class=\"wp-image-4891\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image14-1024x346.png 1024w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image14-300x101.png 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image14-768x259.png 768w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image14-1536x519.png 1536w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image14.png 1841w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<p>The generated token appears on the screen. A copy icon is located just at the end of it: click on it and your code will be transferred to your clipboard. Make sure to paste it somewhere, e.g. a text file.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Generating an API Key<\/h3>\n\n\n\n<p>Open the IBM Cloud home page. On the upper bar, locate <em>Manage<\/em> and click on it, then choose <em>Access (IAM)<\/em>.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"550\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image2-4-1024x550.png\" alt=\"Infrastructure as Code: API Keys\" class=\"wp-image-4879\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image2-4-1024x550.png 1024w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image2-4-300x161.png 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image2-4-768x412.png 768w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image2-4-1536x825.png 1536w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image2-4.png 1840w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<p>Locate the left menu and choose API Keys. Locate the blue box prompting Create an IBM Cloud API key. Click on it, then name your API key: the given name is \u201cinfrastructure\u201d in our example. You have successfully created the requested key: you can see it, save it or download it as a JSON file.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">IBM Cloud Schematics\u2019 GitHub page<\/h3>\n\n\n\n<p>This example is written with Terraform version 0.11 available. New Terraform versions can be published any time, so it\u2019s normal that the Github repositories are updated with new versions of the code- and the old ones are made unavailable.Please check what is the Terraform version (ex.: 11, 12) in the Readme file. The example code page for Terraform version 0.12 is online at <a aria-label=\" (opens in a new tab)\" href=\"http:\/\/github.com\/cloud-schematics\/multizone-vpc-network\" target=\"_blank\" rel=\"noreferrer noopener nofollow\" class=\"ek-link\">this link<\/a>.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"397\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image10-1-1024x397.png\" alt=\"Infrastructure as Code: IBM Cloud Schematics\u2019 GitHub page\" class=\"wp-image-4887\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image10-1-1024x397.png 1024w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image10-1-300x116.png 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image10-1-768x298.png 768w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image10-1-1536x596.png 1536w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image10-1.png 1813w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Schematics: Create a workspace<\/h3>\n\n\n\n<p>From the Schematics screen, click on Create Workspace.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"564\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image12-1024x564.png\" alt=\"Infrastructure as Code: IBM Schematics\" class=\"wp-image-4889\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image12-1024x564.png 1024w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image12-300x165.png 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image12-768x423.png 768w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image12-1536x845.png 1536w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image12.png 1826w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Settings with your number<\/h3>\n\n\n\n<p>You choose a name and click on create. You are assisted with color prompts during this process.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"552\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image1-4-1024x552.png\" alt=\"Infrastructure as Code: settings\" class=\"wp-image-4878\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image1-4-1024x552.png 1024w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image1-4-300x162.png 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image1-4-768x414.png 768w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image1-4.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<p>You now insert the Github page for the describing files and your Github Personal Access Token (if needed; in case you are using IBM\u2019s provided Terraform templates, you don\u2019t need it). On the pull-down menu, choose the correct version for Terraform.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"550\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image15-1024x550.png\" alt=\"Infrastructure as Code: import Terraform template\" class=\"wp-image-4892\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image15-1024x550.png 1024w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image15-300x161.png 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image15-768x412.png 768w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image15-1536x825.png 1536w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image15.png 1818w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<p>You\u2019ll see in this example that the generating directory is located at <em>https:\/\/github.com\/Cloud-Schematics\/multizone-vpc-network\/tree\/master\/tf_v_0_11_x\/multizone_vpc<\/em>.<\/p>\n\n\n\n<p>We also saw how to generate an API key.<\/p>\n\n\n\n<p>You also know we need to check the Terraform version on the ReadMe file in the Github directory.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Import repository&nbsp;<\/h3>\n\n\n\n<p>Import the code from Github, then insert your user\u2019s API key as previously generated.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"408\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image11-1024x408.png\" alt=\"Infrastructure as Code: import from GitHub\" class=\"wp-image-4888\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image11-1024x408.png 1024w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image11-300x120.png 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image11-768x306.png 768w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image11.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Generate a plan<\/h3>\n\n\n\n<p>Just click on the Generate Plan box and wait. The final state will appear like this:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"617\" height=\"165\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image6-2.png\" alt=\"Infrastructure as Code: generate a plan\" class=\"wp-image-4883\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image6-2.png 617w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image6-2-300x80.png 300w\" sizes=\"auto, (max-width: 617px) 100vw, 617px\" \/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Apply plan<\/h3>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"190\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image9-1-1024x190.png\" alt=\"Infrastructure as Code: apply plan\" class=\"wp-image-4886\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image9-1-1024x190.png 1024w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image9-1-300x56.png 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image9-1-768x143.png 768w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image9-1.png 1233w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<p>The freshly generated plan is waiting for you to apply it to real communication and execution hardware. Let\u2019s click on <em>Apply Plan<\/em>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Confirmation<\/h3>\n\n\n\n<p>This is the confirmation message:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"933\" height=\"114\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image13.png\" alt=\"Infrastructure as Code\" class=\"wp-image-4890\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image13.png 933w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image13-300x37.png 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image13-768x94.png 768w\" sizes=\"auto, (max-width: 933px) 100vw, 933px\" \/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Search for Tags<\/h3>\n\n\n\n<p>You can also access logs on the applied plan, which are basically all stored in a text file. To see them, scroll that file and locate the lines named \u201ctag\u201d.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"794\" height=\"69\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image18.png\" alt=\"Infrastructure as Code: Logging\" class=\"wp-image-4895\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image18.png 794w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image18-300x26.png 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image18-768x67.png 768w\" sizes=\"auto, (max-width: 794px) 100vw, 794px\" \/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Verify proper VPC network creation<\/h3>\n\n\n\n<p>Go check the resource list: is this the promised configuration?<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"764\" height=\"227\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image5-2.png\" alt=\"Infrastructure as Code: Verify proper VPC network creation\" class=\"wp-image-4882\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image5-2.png 764w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image5-2-300x89.png 300w\" sizes=\"auto, (max-width: 764px) 100vw, 764px\" \/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Click on the blue tag<\/h3>\n\n\n\n<p>Locate the <em>Edit Tags<\/em> screen, then click on the blue tag name.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"492\" height=\"258\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image4-2.png\" alt=\"Infrastructure as Code: Tags\" class=\"wp-image-4881\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image4-2.png 492w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image4-2-300x157.png 300w\" sizes=\"auto, (max-width: 492px) 100vw, 492px\" \/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Explore VPC Subnets<\/h3>\n\n\n\n<p>You can now explore the created subnets and try to imagine what can you do with such a powerful infrastructure as code workbench.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"617\" height=\"165\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image6-2.png\" alt=\"Infrastructure as Code: generate a plan\" class=\"wp-image-4883\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image6-2.png 617w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image6-2-300x80.png 300w\" sizes=\"auto, (max-width: 617px) 100vw, 617px\" \/><\/figure><\/div>\n\n\n\n<p>It\u2019s done! You have just generated your plan.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"499\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image3-4-1024x499.png\" alt=\"Infrastracture as Code\" class=\"wp-image-4880\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image3-4-1024x499.png 1024w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image3-4-300x146.png 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image3-4-768x374.png 768w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image3-4-1536x748.png 1536w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image3-4.png 1821w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Terraform code<\/h2>\n\n\n\n<p>Before concluding this quick overview, let\u2019s have a look at some code. Here is the first part of the vpc.tf file.<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"PHP\" data-shcb-language-slug=\"php\"><span><code class=\"hljs language-php\"><span class=\"hljs-comment\">##########################################################################<\/span>\n<span class=\"hljs-comment\"># This file creates the VPC, Zones, subnets and public gateway for the VPC<\/span>\n<span class=\"hljs-comment\"># a separate file sets up the load balancers, listeners, pools and members<\/span>\n<span class=\"hljs-comment\">##########################################################################<\/span>\n\n\n<span class=\"hljs-comment\">##########################################################################<\/span>\n<span class=\"hljs-comment\"># Create a VPC<\/span>\n<span class=\"hljs-comment\">##########################################################################<\/span>\n\nresource ibm_is_vpc vpc {\n  name           = <span class=\"hljs-string\">\"${var.unique_id}-vpc\"<\/span>\n  resource_group = <span class=\"hljs-string\">\"${data.ibm_resource_group.resource_group.id}\"<\/span>\n  classic_access = <span class=\"hljs-string\">\"${var.classic_access}\"<\/span>\n  tags           = <span class=\"hljs-string\">\"${var.tags}\"<\/span>\n}\n\n<span class=\"hljs-comment\">##########################################################################<\/span>\n\n\n<span class=\"hljs-comment\">##########################################################################<\/span>\n<span class=\"hljs-comment\"># Prefixes and subnets for zone 1<\/span>\n<span class=\"hljs-comment\">##########################################################################<\/span>\n\nresource ibm_is_vpc_address_prefix subnet_prefix {\n  count = <span class=\"hljs-number\">3<\/span>\n\n  name  = <span class=\"hljs-string\">\"${var.unique_id}-prefix-zone-${count.index + 1}\"<\/span>\n  zone  = <span class=\"hljs-string\">\"${var.ibm_region}-${(count.index % 3) + 1}\"<\/span>\n  vpc   = <span class=\"hljs-string\">\"${ibm_is_vpc.vpc.id}\"<\/span>\n  cidr  = <span class=\"hljs-string\">\"${element(var.cidr_blocks, count.index)}\"<\/span>\n}\n\n<span class=\"hljs-comment\">##########################################################################<\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">PHP<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">php<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">More case studies<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Two provisioned virtual instances&nbsp;<\/h3>\n\n\n\n<p>In this additional example a VPC is created, then it sets up two zones each with a subnet, and places a virtual instance, in each deploying a load balancer attached to the servers. A simple cloud-init script will install nginx, just to showcase an http response for proving out the example.<\/p>\n\n\n\n<p>This example requires a slightly more complex procedure than the previous one. If you want to learn more about it, the code is available at <a aria-label=\" (opens in a new tab)\" href=\"https:\/\/github.com\/Cloud-Schematics\/fs2020\" target=\"_blank\" rel=\"noreferrer noopener nofollow\" class=\"ek-link\">this link<\/a>.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"648\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image16-1024x648.png\" alt=\"\" class=\"wp-image-4893\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image16-1024x648.png 1024w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image16-300x190.png 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image16-768x486.png 768w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image16.png 1083w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">A Kubernetes cluster<\/h3>\n\n\n\n<p>This module creates&nbsp; Kubernetes cluster on an existing VPC network and enables Private ALBs (Application Load Balancers). Optionally, it can also enable public ALBs. Modules are included for Terraform version 0.12.0.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image19-1024x913.png\" alt=\"Infrastructure as Code: A Kubernetes cluster\" class=\"wp-image-4896\" width=\"704\" height=\"627\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image19-1024x913.png 1024w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image19-300x268.png 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image19-768x685.png 768w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/image19.png 1045w\" sizes=\"auto, (max-width: 704px) 100vw, 704px\" \/><\/figure><\/div>\n\n\n\n\n\n\n\n<p>If you want to discover more about IBM Cloud, <a href=\"https:\/\/ibm.co\/3628Ftl\" class=\"ek-link\">click here<\/a>!<\/p>\n\n\n","protected":false},"excerpt":{"rendered":"<p>Infrastructure as Code Infrastructure as Code (IaC) uses a high-level descriptive coding language to automate the provisioning of IT infrastructure. This automation eliminates the need for developers to manually provision and manage servers, operating systems, databases, and other elements that traditionally need to be set up almost from scratch every time they want to develop,&#8230; <a class=\"more-link\" href=\"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/\">Read more<\/a><\/p>\n","protected":false},"author":8,"featured_media":4902,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":9,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","_uag_custom_page_level_css":"","_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[36],"tags":[5221],"collections":[],"class_list":{"0":"post-4876","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-backend","8":"tag-ibm","9":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Infrastructure as Code - Codemotion Magazine<\/title>\n<meta name=\"description\" content=\"Infrastructure as Code (IaC) allows enterprise organizations to automate their infrastructures to reduce costs and risks, fastly responding to new needs.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Infrastructure as Code\" \/>\n<meta property=\"og:description\" content=\"Infrastructure as Code (IaC) allows enterprise organizations to automate their infrastructures to reduce costs and risks, fastly responding to new needs.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/\" \/>\n<meta property=\"og:site_name\" content=\"Codemotion Magazine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Codemotion.Italy\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-18T12:59:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-01-05T19:05:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"673\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Leo Sorge\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:site\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Leo Sorge\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"11 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/\"},\"author\":{\"name\":\"Leo Sorge\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/99fe84861e17797989e16094aac727d5\"},\"headline\":\"Infrastructure as Code\",\"datePublished\":\"2020-05-18T12:59:02+00:00\",\"dateModified\":\"2022-01-05T19:05:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/\"},\"wordCount\":2090,\"publisher\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled.jpg\",\"keywords\":[\"IBM\"],\"articleSection\":[\"Backend\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/\",\"name\":\"Infrastructure as Code - Codemotion Magazine\",\"isPartOf\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled.jpg\",\"datePublished\":\"2020-05-18T12:59:02+00:00\",\"dateModified\":\"2022-01-05T19:05:15+00:00\",\"description\":\"Infrastructure as Code (IaC) allows enterprise organizations to automate their infrastructures to reduce costs and risks, fastly responding to new needs.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/#primaryimage\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled.jpg\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled.jpg\",\"width\":1200,\"height\":673,\"caption\":\"Infrastructure as Code\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Backend\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/backend\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Infrastructure as Code\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#website\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/\",\"name\":\"Codemotion Magazine\",\"description\":\"We code the future. Together\",\"publisher\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\",\"name\":\"Codemotion\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png\",\"width\":225,\"height\":225,\"caption\":\"Codemotion\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Codemotion.Italy\/\",\"https:\/\/x.com\/CodemotionIT\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/99fe84861e17797989e16094aac727d5\",\"name\":\"Leo Sorge\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/60ef89012822fdaeb014dc2b17dcc78c3a835e1dfe86ede053fa46a91926fd29?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/60ef89012822fdaeb014dc2b17dcc78c3a835e1dfe86ede053fa46a91926fd29?s=96&d=mm&r=g\",\"caption\":\"Leo Sorge\"},\"description\":\"I hold a degree in electronics. I talk and write about science and technology in both real and close-to-real worlds since 1976. I frankly believe that business plan and singularity are excellent starts for science-fiction stories.\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/author\/leo-sorge\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Infrastructure as Code - Codemotion Magazine","description":"Infrastructure as Code (IaC) allows enterprise organizations to automate their infrastructures to reduce costs and risks, fastly responding to new needs.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/","og_locale":"en_US","og_type":"article","og_title":"Infrastructure as Code","og_description":"Infrastructure as Code (IaC) allows enterprise organizations to automate their infrastructures to reduce costs and risks, fastly responding to new needs.","og_url":"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/","og_site_name":"Codemotion Magazine","article_publisher":"https:\/\/www.facebook.com\/Codemotion.Italy\/","article_published_time":"2020-05-18T12:59:02+00:00","article_modified_time":"2022-01-05T19:05:15+00:00","og_image":[{"width":1200,"height":673,"url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled.jpg","type":"image\/jpeg"}],"author":"Leo Sorge","twitter_card":"summary_large_image","twitter_creator":"@CodemotionIT","twitter_site":"@CodemotionIT","twitter_misc":{"Written by":"Leo Sorge","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/#article","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/"},"author":{"name":"Leo Sorge","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/99fe84861e17797989e16094aac727d5"},"headline":"Infrastructure as Code","datePublished":"2020-05-18T12:59:02+00:00","dateModified":"2022-01-05T19:05:15+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/"},"wordCount":2090,"publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled.jpg","keywords":["IBM"],"articleSection":["Backend"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/","url":"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/","name":"Infrastructure as Code - Codemotion Magazine","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/#primaryimage"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled.jpg","datePublished":"2020-05-18T12:59:02+00:00","dateModified":"2022-01-05T19:05:15+00:00","description":"Infrastructure as Code (IaC) allows enterprise organizations to automate their infrastructures to reduce costs and risks, fastly responding to new needs.","breadcrumb":{"@id":"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/#primaryimage","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled.jpg","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled.jpg","width":1200,"height":673,"caption":"Infrastructure as Code"},{"@type":"BreadcrumbList","@id":"https:\/\/www.codemotion.com\/magazine\/backend\/infrastructure-as-code\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codemotion.com\/magazine\/"},{"@type":"ListItem","position":2,"name":"Backend","item":"https:\/\/www.codemotion.com\/magazine\/backend\/"},{"@type":"ListItem","position":3,"name":"Infrastructure as Code"}]},{"@type":"WebSite","@id":"https:\/\/www.codemotion.com\/magazine\/#website","url":"https:\/\/www.codemotion.com\/magazine\/","name":"Codemotion Magazine","description":"We code the future. Together","publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codemotion.com\/magazine\/#organization","name":"Codemotion","url":"https:\/\/www.codemotion.com\/magazine\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","width":225,"height":225,"caption":"Codemotion"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Codemotion.Italy\/","https:\/\/x.com\/CodemotionIT"]},{"@type":"Person","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/99fe84861e17797989e16094aac727d5","name":"Leo Sorge","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/60ef89012822fdaeb014dc2b17dcc78c3a835e1dfe86ede053fa46a91926fd29?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/60ef89012822fdaeb014dc2b17dcc78c3a835e1dfe86ede053fa46a91926fd29?s=96&d=mm&r=g","caption":"Leo Sorge"},"description":"I hold a degree in electronics. I talk and write about science and technology in both real and close-to-real worlds since 1976. I frankly believe that business plan and singularity are excellent starts for science-fiction stories.","url":"https:\/\/www.codemotion.com\/magazine\/author\/leo-sorge\/"}]}},"featured_image_src":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled-600x400.jpg","featured_image_src_square":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled-600x600.jpg","author_info":{"display_name":"Leo Sorge","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/leo-sorge\/"},"uagb_featured_image_src":{"full":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled.jpg",1200,673,false],"thumbnail":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled-150x150.jpg",150,150,true],"medium":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled-300x168.jpg",300,168,true],"medium_large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled-768x431.jpg",768,431,true],"large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled-1024x574.jpg",1024,574,true],"1536x1536":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled.jpg",1200,673,false],"2048x2048":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled.jpg",1200,673,false],"small-home-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled.jpg",100,56,false],"sidebar-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled-180x128.jpg",180,128,true],"genesis-singular-images":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled-896x504.jpg",896,504,true],"archive-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled-400x225.jpg",400,225,true],"gb-block-post-grid-landscape":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled-600x400.jpg",600,400,true],"gb-block-post-grid-square":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2020\/05\/Screen-Shot-2019-08-16-at-1.35.38-PM.png-scaled-600x600.jpg",600,600,true]},"uagb_author_info":{"display_name":"Leo Sorge","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/leo-sorge\/"},"uagb_comment_info":0,"uagb_excerpt":"Infrastructure as Code Infrastructure as Code (IaC) uses a high-level descriptive coding language to automate the provisioning of IT infrastructure. This automation eliminates the need for developers to manually provision and manage servers, operating systems, databases, and other elements that traditionally need to be set up almost from scratch every time they want to develop,&#8230;&hellip;","lang":"en","_links":{"self":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/4876","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/comments?post=4876"}],"version-history":[{"count":6,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/4876\/revisions"}],"predecessor-version":[{"id":5148,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/4876\/revisions\/5148"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media\/4902"}],"wp:attachment":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media?parent=4876"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/categories?post=4876"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/tags?post=4876"},{"taxonomy":"collections","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/collections?post=4876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}