{"id":292,"date":"2023-10-26T13:06:12","date_gmt":"2023-10-26T13:06:12","guid":{"rendered":"https:\/\/archicode.be\/?p=292"},"modified":"2023-10-26T13:07:21","modified_gmt":"2023-10-26T13:07:21","slug":"my-experience-with-terraform","status":"publish","type":"post","link":"https:\/\/archicode.be\/index.php\/2023\/10\/26\/my-experience-with-terraform\/","title":{"rendered":"My experience with Terraform."},"content":{"rendered":"<ul>\n<li>Terraform is a technology that allows you to deploy your infrastructure using code.\n<\/li>\n<li>It uses YAML as a file format.\n<\/li>\n<li>It needs registered providers to create the desired infra in the right environment.\n<\/li>\n<li>You can create infra on Azure, AWS as well as on premise.\n<\/li>\n<\/ul>\n<h1>When to use it?<br \/>\n<\/h1>\n<p>When your project requires a specific infrastructure, you can easily create it using terraform.  This being basically code, you can source control it.  You can also create the infrastructure in multiple environments.\n<\/p>\n<p>Let&#8217;s say you often publish website that have azure functions acting as the backend.  You can have one terraform script that will create the new infrastructure whenever needed, just by running the script.  No manual intervention is needed.\n<\/p>\n<p>This means you can reuse the script to create the infra multiple times or customise it sufficiently in order to reuse it for other projects as well.\n<\/p>\n<h1>How?<br \/>\n<\/h1>\n<p>You need basically one file: main.tf which is going to contain all the resources you want to create.  You can use variables that will be put in the variables.tf file or directly in the main.tf if your script is small or you don&#8217;t want multiple files.  I recommend using the variables.tf and also splitting up the main.tf when your script becomes too big to be readable in one file.\n<\/p>\n<h1>Available providers<br \/>\n<\/h1>\n<p>When deploying in the cloud, you have access to different providers that allow terraform to connect to your tenant and create the infrastructure.  There are 3620 different providers.  You can then them <a href=\"https:\/\/registry.terraform.io\/browse\/providers\">here<\/a>.\n<\/p>\n<p>\n\u00a0<\/p>\n<p><em>In conclusion, Terraform is helpful but beware as the apparent simplicity can hide a world of hardships and difficulties.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Terraform is a technology that allows you to deploy your infrastructure using code. It uses YAML as a file format. It needs registered providers to create the desired infra in the right environment. You can create infra on Azure, AWS as well as on premise. When to use it? When your project requires a specific&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[4],"tags":[],"class_list":["post-292","post","type-post","status-publish","format-standard","hentry","category-misc"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":287,"url":"https:\/\/archicode.be\/index.php\/2023\/05\/28\/infrastructure-as-code-and-source-controle\/","url_meta":{"origin":292,"position":0},"title":"Infrastructure as Code and source controle","author":"Hakim","date":"May 28, 2023","format":false,"excerpt":"For those who don't what is this about, Infrastructure as Code is a set of files when executed with the right tool, will create resources such as storage account, databases, virtual network etc. It is mostly associated with the cloud. As I've been working lately with Terraform, I really enjoyed\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":159,"url":"https:\/\/archicode.be\/index.php\/2020\/06\/24\/feature-flags-using-azure-feature\/","url_meta":{"origin":292,"position":1},"title":"Feature flags using Azure feature","author":"Hakim","date":"June 24, 2020","format":false,"excerpt":"Feature flags are very useful when you develop an application and while you don't want users to use the feature that isn't really ready, you don't want to stay on a side branch for too long as merging and rebasing from the main branch can become quite the chore. Enter\u2026","rel":"","context":"In &quot;.NET&quot;","block_context":{"text":".NET","link":"https:\/\/archicode.be\/index.php\/category\/net\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":20,"url":"https:\/\/archicode.be\/index.php\/2019\/02\/16\/esp8266-the-iot-prototyping-graal\/","url_meta":{"origin":292,"position":2},"title":"Esp8266 &#8211; the IOT prototyping Graal","author":"Hakim","date":"February 16, 2019","format":false,"excerpt":"1. A Esp-01 (the most basic of all the Esp8266) I've been working for some time now with IOT and I've worked extensively with the Esp8266 chip just because I'm testing a lot of stuff and don't want to spend a lot of money in it. You can get these\u2026","rel":"","context":"In &quot;IoT&quot;","block_context":{"text":"IoT","link":"https:\/\/archicode.be\/index.php\/category\/iot\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":137,"url":"https:\/\/archicode.be\/index.php\/2020\/06\/09\/publish-a-xamarin-app-to-app-center-with-azure-pipeline\/","url_meta":{"origin":292,"position":3},"title":"Publish a Xamarin app to App Center with Azure Pipeline.","author":"Hakim","date":"June 9, 2020","format":false,"excerpt":"I've been working on an android app with Xamarin lately and I wanted to deploy it to App Center automatically so I can install it on my mobile to test it as I hate manual deployment. I knew that App Center had a connector to azure devops repositories so you\u2026","rel":"","context":"In &quot;Uncategorised&quot;","block_context":{"text":"Uncategorised","link":"https:\/\/archicode.be\/index.php\/category\/uncategorised\/"},"img":{"alt_text":"","src":"\/wp-content\/uploads\/2020\/06\/image-2-1024x1018.png","width":350,"height":200},"classes":[]},{"id":353,"url":"https:\/\/archicode.be\/index.php\/2023\/12\/03\/the-reuse-release-equivalence-principle-a-key-to-modular-design\/","url_meta":{"origin":292,"position":4},"title":"The Reuse\/Release Equivalence Principle: A Key to Modular Design","author":"Hakim","date":"December 3, 2023","format":false,"excerpt":"One of the challenges of software development is to create reusable and maintainable code. Reusable code can reduce duplication, improve quality, and save time and resources. Maintainable code is code that is easy to adapt, easy to correct and where those adaptation and change do not break any other part\u2026","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":92,"url":"https:\/\/archicode.be\/index.php\/2019\/06\/10\/how-to-blazorify-an-existing-mvc-app\/","url_meta":{"origin":292,"position":5},"title":"How to blazorify an existing mvc app","author":"Hakim","date":"June 10, 2019","format":false,"excerpt":"Blazor is awesome. \u00a0If you don't know what it is, you can check it out here\u00a0but to summarize, it's a framework that allows .net code to run in your browser using the power of Web Assembly. I've found a lot of tutorials using the official blazor templates but only hints\u2026","rel":"","context":"In &quot;.NET&quot;","block_context":{"text":".NET","link":"https:\/\/archicode.be\/index.php\/category\/net\/"},"img":{"alt_text":"migrate_solution_to_dotnet_core_3.gif","src":"\/wp-content\/uploads\/2019\/06\/migrate_solution_to_dotnet_core_3.gif","width":350,"height":200,"srcset":"\/wp-content\/uploads\/2019\/06\/migrate_solution_to_dotnet_core_3.gif 1x, \/wp-content\/uploads\/2019\/06\/migrate_solution_to_dotnet_core_3.gif 1.5x, \/wp-content\/uploads\/2019\/06\/migrate_solution_to_dotnet_core_3.gif 2x, \/wp-content\/uploads\/2019\/06\/migrate_solution_to_dotnet_core_3.gif 3x, \/wp-content\/uploads\/2019\/06\/migrate_solution_to_dotnet_core_3.gif 4x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/posts\/292","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/comments?post=292"}],"version-history":[{"count":4,"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/posts\/292\/revisions"}],"predecessor-version":[{"id":296,"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/posts\/292\/revisions\/296"}],"wp:attachment":[{"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/media?parent=292"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/categories?post=292"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/tags?post=292"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}