{"id":20,"date":"2019-02-16T15:21:32","date_gmt":"2019-02-16T15:21:32","guid":{"rendered":"https:\/\/archicode.be\/?p=20"},"modified":"2019-02-16T15:21:32","modified_gmt":"2019-02-16T15:21:32","slug":"esp8266-the-iot-prototyping-graal","status":"publish","type":"post","link":"https:\/\/archicode.be\/index.php\/2019\/02\/16\/esp8266-the-iot-prototyping-graal\/","title":{"rendered":"Esp8266 &#8211; the IOT prototyping Graal"},"content":{"rendered":"<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/2019\/02\/021719_0008_Esp8266theI1.jpg\" alt=\"\" \/><figcaption><br \/><i>1. A Esp-01 (the most basic of all the Esp8266)<\/i><\/figcaption><\/figure><\/div>\n\n<p>I&#8217;ve been working for some time now with IOT and I&#8217;ve worked extensively with the Esp8266 chip just because I&#8217;m testing a lot of stuff and don&#8217;t want to spend a lot of money in it.<\/p>\n\n<p>You can get these small WiFi chips at very reasonable prices like <a href=\"https:\/\/m.fr.aliexpress.com\/wholesale\/Esp8266.html?searchType=mainSearch&amp;keywords=Esp8266&amp;shadingAction=&amp;channel=direct\" target=\"_blank\" rel=\"noopener noreferrer\">these<\/a> on Aliexpress for example. The main reason beside their price about why Esp8266 are so interesting is because along with their WiFi capabilities, they are fully programmable like arduinos and there are countless of libraries available for them, not the least the set of libraries allowing you to connect to Azure IOT Hub. That&#8217;s what we are going to do in this post.<\/p>\n\n<p><strong><i>Pre-requisite : To make this work you need to have an Azure IOT hub ready. If you don&#8217;t have one already, you can check this Microsoft Docs to create one : <\/i><\/strong><strong><i><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/iot-hub\/quickstart-send-telemetry-dotnet\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">https:\/\/docs.microsoft.com\/en-us\/azure\/iot-hub\/quickstart-send-telemetry-dotnet<\/a><\/i><\/strong><i><\/i><\/p>\n\n<p><strong><i>Remarks : In this tutorial I will be using Visual Studio Code but you can use Arduino IDE directly if you want. The main reason I&#8217;m using Visual Studio Code is because of the dark theme (I just love it).<\/i><\/strong><\/p>\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/2019\/02\/021719_0008_Esp8266theI2.png\" alt=\"\" \/><figcaption><br \/><i>2. See what I mean?<\/i><\/figcaption><\/figure><\/div>\n\n<h1 class=\"wp-block-heading\">Starting blocks<\/h1>\n\n<p>If you&#8217;re not already familiar with working with arduinos, you need to know that a typical Arduino program contains two main methods : setup() and loop().<\/p>\n\n<p>The setup() method is executed once when the device starts up. The loop() method is executed continuously in an infinite loop until the device stops (by turning it off yourself or a power failure, etc\u2026)<\/p>\n\n<pre class=\"wp-block-code\"><code>void setup() { } void loop() { }<\/code><\/pre>\n\n<p>The Esp8266 can be programmed as any Arduino and to do so, you need first the Arduino IDE that you can download here : <a href=\"https:\/\/www.arduino.cc\/en\/Main\/Software\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">https:\/\/www.arduino.cc\/en\/Main\/Software<\/a>.<\/p>\n\n<p>You can find here everything you need to configure the Arduino IDE to program the Esp8266 : <a href=\"https:\/\/github.com\/esp8266\/Arduino\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">https:\/\/github.com\/esp8266\/Arduino<\/a>.<\/p>\n\n<p>Once this is done, you can, if you want to use the same environment as I do in this post, download Visual Studio Code here : <a href=\"https:\/\/code.visualstudio.com\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">https:\/\/code.visualstudio.com\/<\/a><\/p>\n\n<p>You can then download the Arduino extension in the Visual Studio Code and configuring accordingly (going into settings to specify the path to the Arduino IDE) to make this work.<\/p>\n\n<h1 class=\"wp-block-heading\">Coding<\/h1>\n\n<p>In this tutorial, we&#8217;re not going to use any sensor, we&#8217;re just going to send dummy data as the aim here is to help you connect the Esp8266 to Azure IOT Hub so whether or not we have a sensor is irrelevant.<\/p>\n\n<h2 class=\"wp-block-heading\">Libraries<\/h2>\n\n<p>The first thing we need are the libraries. Without them, you can either code everything by yourself and reinvent the wheel (which can be very fulfilling I can imagine), or you can just prepare yourself to give up. Whatever you decide, just use the libraries.<\/p>\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"\/wp-content\/uploads\/2019\/02\/021719_0008_Esp8266theI3.png\" alt=\"\" \/><figcaption><br \/><i>3. The Arduino Library Manager as seen in Visual Studio Code<\/i><\/figcaption><\/figure>\n\n<p>You need to go to the library manager and download the following :<\/p>\n\n<ul class=\"wp-block-list\"><li>AzureIotHub<\/li><li>AzureIotUtility<\/li><li>AzureIotProtocol_MQTT<\/li><li>ESP8266WiFi<\/li><\/ul>\n\n<p>Now it is important to note that you need to include them in your app file in the following order<\/p>\n\n<pre class=\"wp-block-code\"><code>#include &lt;AzureIoTHub.h&gt; #include &lt;AzureIoTUtility.h&gt; #include &lt;AzureIoTProtocol_MQTT.h&gt; #include \"ESP8266WiFi.h\"<\/code><\/pre>\n\n<p>or you will have some weird error like this one :<\/p>\n\n<pre class=\"wp-block-code\"><code>AzureIoTProtocol_MQTT\\src\/AzureIoTProtocol_MQTT.h:7:39: fatal error: azure_umqtt_c\/mqtt_client.h: No such file or directory\u00a0 #include \"azure_umqtt_c\/mqtt_client.h\"\u00a0 ^ compilation terminated. exit status 1 [Error] Exit with code=1<\/code><\/pre>\n\n<p>And by doing so, you will be saving a few hours of mad, non-sense debugging. Trust me, I&#8217;ve been there.<\/p>\n\n<h2 class=\"wp-block-heading\">Init WiFi<\/h2>\n\n<p>Now is the time to really start to code. The following code snipper initializes the WiFi connection.<\/p>\n\n<pre class=\"wp-block-code\"><code>void initWifi() {\u00a0\u00a0\u00a0\u00a0 Serial.println(\"Initialising wifi connection\");\u00a0\u00a0\u00a0\u00a0 Serial.print(\"Connecting to WiFi network \");\u00a0\u00a0\u00a0\u00a0 WiFi.mode(WIFI_STA);\u00a0\u00a0\u00a0\u00a0 WiFi.begin(\"yourNetworkSsid\", \"yourNetworkPassword\");\u00a0\u00a0\u00a0\u00a0 while (WiFi.status() != WL_CONNECTED)\u00a0\u00a0\u00a0\u00a0 {\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 delay(500);\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Serial.print('.');\u00a0\u00a0\u00a0\u00a0 }\u00a0\u00a0\u00a0\u00a0 Serial.println(\"\");\u00a0\u00a0\u00a0\u00a0 Serial.println(\"WIFI connection\");\u00a0\u00a0\u00a0\u00a0 Serial.print(\"IP Address : \");\u00a0\u00a0\u00a0\u00a0 Serial.print(WiFi.localIP()); } <\/code><\/pre>\n\n<p>This piece of code uses the ESP8266WIFI library.<\/p>\n\n<ul class=\"wp-block-list\"><li>WiFi.mode(WIFI_STA) : sets the WiFi mode to client. The other possible modes are WIFI_AP, WIFI_STA, WIFI_AP_STA or WIFI_OFF (see <a href=\"http:\/\/esp8266.github.io\/Arduino\/versions\/2.1.0-rc1\/doc\/libraries.html\">http:\/\/esp8266.github.io\/Arduino\/versions\/2.1.0-rc1\/doc\/libraries.html<\/a>).<\/li><li>WiFi.begin(&#8220;yourNetworkSsid&#8221;, &#8220;yourNetworkPassword&#8221;) : Tells the Esp8266 to try connecting to the network specified in parameter 1 with the password specified in parameter 2.<\/li><li>while (WiFi.status() != WL_CONNECTED) : This starts a loop that will exist when the Esp8266 is connected to the specified network or until a timeout occurs. Note that there&#8217;s a delay in the loop. In my opinion it&#8217;s good practice to add a delay of a few milliseconds in loops that include connecting to something as it gives the time for the process to complete or gracefully exit before starting the process again.<\/li><\/ul>\n\n<h2 class=\"wp-block-heading\">Init Time<\/h2>\n\n<p>I would like you to be extra careful now, because this is a piece of code that eluded me and it gave me a few headaches.<\/p>\n\n<p><strong><i>Before connecting to Azure IOT Hub you need to properly init the time on your Esp8266 as it doesn&#8217;t have an internal clock and the time needs to be right or you&#8217;ll always get an Access Denied error when trying to connect.<\/i><\/strong><\/p>\n\n<pre class=\"wp-block-code\"><code>void initTime() {\u00a0\u00a0\u00a0\u00a0 time_t epochTime;\u00a0\u00a0\u00a0\u00a0 configTime(0, 0, \"pool.ntp.org\", \"time.nist.gov\");\u00a0\u00a0\u00a0\u00a0 while (true)\u00a0\u00a0\u00a0\u00a0 {\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 epochTime = time(NULL);\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if (epochTime == 0)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 {\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Serial.println(\"Fetching NTP epoch time failed! Waiting 2 seconds to retry.\");\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 delay(2000);\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 else\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 {\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Serial.printf(\"Fetched NTP epoch time is: %lu.\\r\\n\", epochTime);\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 break;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }\u00a0\u00a0\u00a0\u00a0 } } <\/code><\/pre>\n\n<p>The code is self-explanatory. The only important thing here is that we&#8217;re trying to connect to either of the two time server specified in the configTime method parameters, namely pool.ntp.or and time.nist.gov. This worked for me but feel free to use your favourite time server instead, it should work just fine.<\/p>\n\n<h2 class=\"wp-block-heading\">Using the Azure IOT Hub libraries<\/h2>\n\n<p>This is where it gets interesting (if it wasn&#8217;t already the case)<\/p>\n\n<p>To connect to the IOT Hub we first need to a IOTHUB_CLIENT_LL_HANDLE like so :<\/p>\n\n<pre class=\"wp-block-code\"><code>IOTHUB_CLIENT_LL_HANDLE iotHubClientHandle;<\/code><\/pre>\n\n<p>Then we need to initialize the client<\/p>\n\n<pre class=\"wp-block-code\"><code>iotHubClientHandle = IoTHubClient_LL_CreateFromConnectionString(IOT_HUB_CONNECTION_STRING, MQTT_Protocol);<\/code><\/pre>\n\n<p>The IOT_HUB_CONNECTION_STRING represents the connection string to your Azure IOT Hub device that you configured. You can find it in your Azure Portal. We need to have a message to send.<br \/>We&#8217;re building here a dummy one.<\/p>\n\n<pre class=\"wp-block-code\"><code>String JSONMessage = \"{\\\"Temperature\\\":25, \\\"Humidity\\\":50}\";<\/code><\/pre>\n\n<p>Then we create a IOTHUB_MESSAGE_HANDLE<\/p>\n\n<pre class=\"wp-block-code\"><code>IOTHUB_MESSAGE_HANDLE messageHandle = IoTHubMessage_CreateFromString(JSONMessage.c_str());<\/code><\/pre>\n\n<p>In case there&#8217;s an issue with the messageHandle we do this test<\/p>\n\n<pre class=\"wp-block-code\"><code>if (messageHandle == NULL)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 {\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Serial.println(\"Unable to create a new IoTHubMessage.\");\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 } else\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 {\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 if (IoTHubClient_LL_SendEventAsync(iotHubClientHandle, messageHandle, sendCallback, (void *)(uintptr_t)messageTrackingId) != IOTHUB_CLIENT_OK)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 {\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Serial.println(\"The client hasn't accepted the message\");\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 else\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 {\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (void)printf(\" Message Id: %u Sent.\\r\\n\", messageTrackingId);\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 IoTHubMessage_Destroy(messageHandle);\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 } <\/code><\/pre>\n\n<p>In the else scope, we add the message in the queue of event to send. If there are not problem during this we can destroy the messageHandle. Always keep in mind resources are extremely limited on a Esp8266.<\/p>\n\n<p>The IotHubClient_LL_SendEventAsync accepts 4 parameters :<\/p>\n\n<ul class=\"wp-block-list\"><li>iotHubClientHandle : the client created before.<\/li><li>messageHandle : the handle of the message we want to send<\/li><li>sendCallback : a void method that will be executed when the iotHubClientHandle actually sent the event to the Azure IOT Hub.<\/li><li>(void *)(uintptr_t)messageTrackingId : [Optional] I haven&#8217;t looked up what is this about.<\/li><\/ul>\n\n<p>Now we&#8217;re ready to process the sending of the events :<\/p>\n\n<pre class=\"wp-block-code\"><code>IOTHUB_CLIENT_STATUS status;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 while ((IoTHubClient_LL_GetSendStatus(iotHubClientHandle, &amp;status) == IOTHUB_CLIENT_OK) &amp;&amp; status == IOTHUB_CLIENT_SEND_STATUS_BUSY)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 {\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Serial.println(\"In the sending loop\");\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Serial.println(IOTHUB_CLIENT_STATUSStrings(status));\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 IoTHubClient_LL_DoWork(iotHubClientHandle);\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 ThreadAPI_Sleep(10000);\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 }\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 IoTHubClient_LL_Destroy(iotHubClientHandle); }\u00a0\u00a0\u00a0\u00a0 }\u00a0\u00a0\u00a0\u00a0 else\u00a0\u00a0\u00a0\u00a0 {\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Serial.println(\"Could not create the iot hub client handler\");\u00a0\u00a0\u00a0\u00a0 } <\/code><\/pre>\n\n<p>And that&#8217;s it. Now when you upload this code to your Esp8266 you should see events being sent to your Azure IOT Hub. Mind that if you need to set up a custom message routing or a client reading the Azure IOT Hub events.<\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been working for some time now with IOT and I&#8217;ve worked extensively with the Esp8266 chip just because I&#8217;m testing a lot of stuff and don&#8217;t want to spend a lot of money in it. You can get these small WiFi chips at very reasonable prices like these on Aliexpress for example. The main&#8230;<\/p>\n","protected":false},"author":1,"featured_media":69,"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":[3],"tags":[9,10,12,14,18,19],"class_list":["post-20","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-iot","tag-arduino","tag-azure","tag-azure-iot-hub","tag-c","tag-esp8266","tag-iot"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":137,"url":"https:\/\/archicode.be\/index.php\/2020\/06\/09\/publish-a-xamarin-app-to-app-center-with-azure-pipeline\/","url_meta":{"origin":20,"position":0},"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":377,"url":"https:\/\/archicode.be\/index.php\/2024\/05\/15\/issue-when-debugging-azure-function-locally\/","url_meta":{"origin":20,"position":1},"title":"Issue when debugging Azure Function locally","author":"Hakim","date":"May 15, 2024","format":false,"excerpt":"If you're developing Azure Functions, it may happen that you encounter this error : Failed to decrypt settings. Encrypted settings only be edited through 'func settings add'. That often means that there's an issue with your local.settings.json file. There are different ways that people might use to circumvent this error\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":159,"url":"https:\/\/archicode.be\/index.php\/2020\/06\/24\/feature-flags-using-azure-feature\/","url_meta":{"origin":20,"position":2},"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":287,"url":"https:\/\/archicode.be\/index.php\/2023\/05\/28\/infrastructure-as-code-and-source-controle\/","url_meta":{"origin":20,"position":3},"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":13,"url":"https:\/\/archicode.be\/index.php\/2019\/02\/14\/mvas-dead-long-live-microsoft-learn\/","url_meta":{"origin":20,"position":4},"title":"MVA&#8217;s dead, long live Microsoft Learn","author":"Hakim","date":"February 14, 2019","format":false,"excerpt":"I've been a regular user of Microsoft virtual academy for quite some time now and when I heard the news about it being decommissioned I felt a bit nostalgic. This is where I learnt WCF and tons of other stuff, and the content was ever growing at the time and\u2026","rel":"","context":"In &quot;Misc&quot;","block_context":{"text":"Misc","link":"https:\/\/archicode.be\/index.php\/category\/misc\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":292,"url":"https:\/\/archicode.be\/index.php\/2023\/10\/26\/my-experience-with-terraform\/","url_meta":{"origin":20,"position":5},"title":"My experience with Terraform.","author":"Hakim","date":"October 26, 2023","format":false,"excerpt":"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\u2026","rel":"","context":"In &quot;Misc&quot;","block_context":{"text":"Misc","link":"https:\/\/archicode.be\/index.php\/category\/misc\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/posts\/20","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=20"}],"version-history":[{"count":0,"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/posts\/20\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/archicode.be\/index.php\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/media?parent=20"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/categories?post=20"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/archicode.be\/index.php\/wp-json\/wp\/v2\/tags?post=20"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}