{"id":5767,"date":"2021-06-14T06:15:15","date_gmt":"2021-06-14T04:15:15","guid":{"rendered":"https:\/\/www.almtoolbox.com\/blog\/?p=5767"},"modified":"2021-06-14T08:09:57","modified_gmt":"2021-06-14T06:09:57","slug":"building-infrastructure-using-terraform","status":"publish","type":"post","link":"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/","title":{"rendered":"Building Infrastructure using Terraform"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-5768\" src=\"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2021\/06\/hashicorp-terraform-logo.jpg\" alt=\"hashicorp terraform logo\" width=\"768\" height=\"232\" srcset=\"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/2021\/06\/hashicorp-terraform-logo.jpg 820w, https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/2021\/06\/hashicorp-terraform-logo-300x91.jpg 300w, https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/2021\/06\/hashicorp-terraform-logo-150x45.jpg 150w, https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/2021\/06\/hashicorp-terraform-logo-768x232.jpg 768w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/p>\n<p>Here are two real use cases where we helped our customers to build &#8220;Infrastructure as Code&#8221; using Terraform.<\/p>\n<h3>1. Customer from segment of energy saving and IoT<\/h3>\n<p><span style=\"font-weight: 400;\">The customer has a web application build using GitLab CI. The customer uses AWS as an infrastructure with Cloud front, S3, Route 53 and external DNS provider. They needed to be able of set up an environment fast and in a consistent manner without &#8220;black magic&#8221;.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The tool that we chose with the customer was <em>Terraform<\/em>. Using Terraform we created all the resources for the application to be able to run. We dealt with security issues (e.g. S3 bucket had to be private but still accessible to the CloudFront), caching and more.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">We used S3 bucket to hold the state of the terraform so the script can run everywhere and used DynamoDB to make sure the Terraform script will not run in parallel even from different machines.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">With the Terraform script and Terraform workspace the customer can now create and manage multiple environments and can be sure that all of them are exactly the same.<\/span><\/p>\n<h3><\/h3>\n<h3>2. Customer: Web-based memorial solution<\/h3>\n<p><span style=\"font-weight: 400;\">In this project we used <em>Terraform<\/em> to control the infrastructure on AWS and DigitalOcean.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">We created a Kubernetes cluster and used the Terraform Helm3 integration to install infrastructure applications like monitoring and databases like Elastic search, MySQL and etcd.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">On AWS we created the infrastructure to support the WEB client which included Cloudfront and S3.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The Terraform script supports environment variables and use Terraform workspace to be able to create several environments (Testing and production)<\/span><\/p>\n<p><span style=\"font-weight: 400;\">We used S3 bucket to hold the state of the terraform so the script can run everywhere and used DynamoDB to make sure the Terraform script will not run in parallel even from different machines.<\/span><\/p>\n<div class=\"alm-box alm-contact\">\n<p>Do you need help with Terraform and to apply its best practices?<br \/>\n<em>We officially represent HashiCorp company and we provide consulting, training, support, managed services and selling Enterprise \/ cloud subscription licenses.<\/em><\/p>\n<h4><em>Contact us: <a href=\"mailto:terraform@almtoolbox.com\" target=\"_blank\" rel=\"noopener\">terraform@almtoolbox.com<\/a> or call us: 866-503-1471 (USA \/ Canada) or +31 85 064 4633 (International)<\/em><\/h4>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Here are two real use cases where we helped our customers to build &#8220;Infrastructure as Code&#8221; using Terraform. 1. Customer from segment of energy saving and IoT The customer has a web application build using GitLab CI. The customer uses AWS as an infrastructure with Cloud front, S3, Route 53 and external DNS provider. They [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":5768,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42,91,211,302],"tags":[309,308],"class_list":["post-5767","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud","category-devops","category-hashicorp","category-terraform","tag-infrastructure-as-service","tag-use-cases"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Building Infrastructure using Terraform - ALMtoolbox News<\/title>\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.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Building Infrastructure using Terraform - ALMtoolbox News\" \/>\n<meta property=\"og:description\" content=\"Here are two real use cases where we helped our customers to build &#8220;Infrastructure as Code&#8221; using Terraform. 1. Customer from segment of energy saving and IoT The customer has a web application build using GitLab CI. The customer uses AWS as an infrastructure with Cloud front, S3, Route 53 and external DNS provider. They [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/\" \/>\n<meta property=\"og:site_name\" content=\"ALMtoolbox News\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/almtoolbox.israel\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-06-14T04:15:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-06-14T06:09:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2021\/06\/hashicorp-terraform-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"820\" \/>\n\t<meta property=\"og:image:height\" content=\"248\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Tamir Gefen\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@Dikla\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tamir Gefen\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/\"},\"author\":{\"name\":\"Tamir Gefen\",\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/#\/schema\/person\/409e35aa3486f92208065230bb6ebb63\"},\"headline\":\"Building Infrastructure using Terraform\",\"datePublished\":\"2021-06-14T04:15:15+00:00\",\"dateModified\":\"2021-06-14T06:09:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/\"},\"wordCount\":344,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2021\/06\/hashicorp-terraform-logo.jpg\",\"keywords\":[\"infrastructure as service\",\"use cases\"],\"articleSection\":[\"Cloud\",\"DevOps\",\"HashiCorp\",\"Terraform\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/\",\"url\":\"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/\",\"name\":\"Building Infrastructure using Terraform - ALMtoolbox News\",\"isPartOf\":{\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2021\/06\/hashicorp-terraform-logo.jpg\",\"datePublished\":\"2021-06-14T04:15:15+00:00\",\"dateModified\":\"2021-06-14T06:09:57+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/#primaryimage\",\"url\":\"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2021\/06\/hashicorp-terraform-logo.jpg\",\"contentUrl\":\"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2021\/06\/hashicorp-terraform-logo.jpg\",\"width\":820,\"height\":248,\"caption\":\"hashicorp terraform logo\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.almtoolbox.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Building Infrastructure using Terraform\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/#website\",\"url\":\"https:\/\/www.almtoolbox.com\/blog\/\",\"name\":\"ALMtoolbox News\",\"description\":\"All the news of ALMtoolbox\",\"publisher\":{\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.almtoolbox.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/#organization\",\"name\":\"ALMtoolbox\",\"url\":\"https:\/\/www.almtoolbox.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2015\/10\/logo.png\",\"contentUrl\":\"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2015\/10\/logo.png\",\"width\":410,\"height\":190,\"caption\":\"ALMtoolbox\"},\"image\":{\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/almtoolbox.israel\/\",\"https:\/\/www.linkedin.com\/company\/almtoolbox\/\",\"https:\/\/www.youtube.com\/user\/GoMidjets\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/#\/schema\/person\/409e35aa3486f92208065230bb6ebb63\",\"name\":\"Tamir Gefen\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d3d4df00aa386b2805c42441dfebcedd46abf25846febb352f00c11524d994c4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d3d4df00aa386b2805c42441dfebcedd46abf25846febb352f00c11524d994c4?s=96&d=mm&r=g\",\"caption\":\"Tamir Gefen\"},\"sameAs\":[\"https:\/\/x.com\/Dikla\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Building Infrastructure using Terraform - ALMtoolbox News","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.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/","og_locale":"en_US","og_type":"article","og_title":"Building Infrastructure using Terraform - ALMtoolbox News","og_description":"Here are two real use cases where we helped our customers to build &#8220;Infrastructure as Code&#8221; using Terraform. 1. Customer from segment of energy saving and IoT The customer has a web application build using GitLab CI. The customer uses AWS as an infrastructure with Cloud front, S3, Route 53 and external DNS provider. They [&hellip;]","og_url":"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/","og_site_name":"ALMtoolbox News","article_publisher":"https:\/\/www.facebook.com\/almtoolbox.israel\/","article_published_time":"2021-06-14T04:15:15+00:00","article_modified_time":"2021-06-14T06:09:57+00:00","og_image":[{"width":820,"height":248,"url":"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2021\/06\/hashicorp-terraform-logo.jpg","type":"image\/jpeg"}],"author":"Tamir Gefen","twitter_card":"summary_large_image","twitter_creator":"@Dikla","twitter_misc":{"Written by":"Tamir Gefen","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/#article","isPartOf":{"@id":"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/"},"author":{"name":"Tamir Gefen","@id":"https:\/\/www.almtoolbox.com\/blog\/#\/schema\/person\/409e35aa3486f92208065230bb6ebb63"},"headline":"Building Infrastructure using Terraform","datePublished":"2021-06-14T04:15:15+00:00","dateModified":"2021-06-14T06:09:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/"},"wordCount":344,"commentCount":0,"publisher":{"@id":"https:\/\/www.almtoolbox.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/#primaryimage"},"thumbnailUrl":"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2021\/06\/hashicorp-terraform-logo.jpg","keywords":["infrastructure as service","use cases"],"articleSection":["Cloud","DevOps","HashiCorp","Terraform"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/","url":"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/","name":"Building Infrastructure using Terraform - ALMtoolbox News","isPartOf":{"@id":"https:\/\/www.almtoolbox.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/#primaryimage"},"image":{"@id":"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/#primaryimage"},"thumbnailUrl":"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2021\/06\/hashicorp-terraform-logo.jpg","datePublished":"2021-06-14T04:15:15+00:00","dateModified":"2021-06-14T06:09:57+00:00","breadcrumb":{"@id":"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/#primaryimage","url":"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2021\/06\/hashicorp-terraform-logo.jpg","contentUrl":"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2021\/06\/hashicorp-terraform-logo.jpg","width":820,"height":248,"caption":"hashicorp terraform logo"},{"@type":"BreadcrumbList","@id":"https:\/\/www.almtoolbox.com\/blog\/building-infrastructure-using-terraform\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.almtoolbox.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Building Infrastructure using Terraform"}]},{"@type":"WebSite","@id":"https:\/\/www.almtoolbox.com\/blog\/#website","url":"https:\/\/www.almtoolbox.com\/blog\/","name":"ALMtoolbox News","description":"All the news of ALMtoolbox","publisher":{"@id":"https:\/\/www.almtoolbox.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.almtoolbox.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.almtoolbox.com\/blog\/#organization","name":"ALMtoolbox","url":"https:\/\/www.almtoolbox.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.almtoolbox.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2015\/10\/logo.png","contentUrl":"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2015\/10\/logo.png","width":410,"height":190,"caption":"ALMtoolbox"},"image":{"@id":"https:\/\/www.almtoolbox.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/almtoolbox.israel\/","https:\/\/www.linkedin.com\/company\/almtoolbox\/","https:\/\/www.youtube.com\/user\/GoMidjets"]},{"@type":"Person","@id":"https:\/\/www.almtoolbox.com\/blog\/#\/schema\/person\/409e35aa3486f92208065230bb6ebb63","name":"Tamir Gefen","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.almtoolbox.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d3d4df00aa386b2805c42441dfebcedd46abf25846febb352f00c11524d994c4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d3d4df00aa386b2805c42441dfebcedd46abf25846febb352f00c11524d994c4?s=96&d=mm&r=g","caption":"Tamir Gefen"},"sameAs":["https:\/\/x.com\/Dikla"]}]}},"_links":{"self":[{"href":"https:\/\/www.almtoolbox.com\/blog\/wp-json\/wp\/v2\/posts\/5767","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.almtoolbox.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.almtoolbox.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.almtoolbox.com\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.almtoolbox.com\/blog\/wp-json\/wp\/v2\/comments?post=5767"}],"version-history":[{"count":8,"href":"https:\/\/www.almtoolbox.com\/blog\/wp-json\/wp\/v2\/posts\/5767\/revisions"}],"predecessor-version":[{"id":5777,"href":"https:\/\/www.almtoolbox.com\/blog\/wp-json\/wp\/v2\/posts\/5767\/revisions\/5777"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.almtoolbox.com\/blog\/wp-json\/wp\/v2\/media\/5768"}],"wp:attachment":[{"href":"https:\/\/www.almtoolbox.com\/blog\/wp-json\/wp\/v2\/media?parent=5767"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.almtoolbox.com\/blog\/wp-json\/wp\/v2\/categories?post=5767"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.almtoolbox.com\/blog\/wp-json\/wp\/v2\/tags?post=5767"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}