<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Bolarinwa Olayinka</title>
    <description>The latest articles on DEV Community by Bolarinwa Olayinka (@bolarinwaolayinka).</description>
    <link>https://dev.to/bolarinwaolayinka</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1341617%2F1e18539f-3306-4649-8433-bdcb613c1ffa.png</url>
      <title>DEV Community: Bolarinwa Olayinka</title>
      <link>https://dev.to/bolarinwaolayinka</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bolarinwaolayinka"/>
    <language>en</language>
    <item>
      <title>The Journey from a Simple 'Click' to a Confirmed Connection</title>
      <dc:creator>Bolarinwa Olayinka</dc:creator>
      <pubDate>Thu, 31 Jul 2025 14:02:57 +0000</pubDate>
      <link>https://dev.to/bolarinwaolayinka/the-journey-from-a-simple-click-to-a-confirmed-connection-4144</link>
      <guid>https://dev.to/bolarinwaolayinka/the-journey-from-a-simple-click-to-a-confirmed-connection-4144</guid>
      <description>&lt;p&gt;Building a modern application is rarely a single, smooth process. It’s a series of meticulously solved problems, often starting with the most basic components. This week, I hit a significant milestone on my latest project, but the journey to get there was a valuable lesson in full-stack debugging and resilience.&lt;/p&gt;

&lt;p&gt;The task seemed straightforward: create a settings page in a React application that allows a user to save their Azure DevOps credentials. The first step was to build the two sides of the connection: the frontend, a user-friendly interface, and the backend, a robust Node.js server designed to receive and process the data.&lt;/p&gt;

&lt;p&gt;At first glance, everything looked correct. I had two separate terminals open, each running a server. The frontend application was live in my browser, and the backend terminal showed the comforting message, "Backend server running on port 5000." My code was in place, and I confidently typed in the details and clicked the "Save Azure DevOps Settings" button.&lt;/p&gt;

&lt;p&gt;Then came the first unexpected challenge. The frontend displayed a success pop-up, but nothing—absolutely nothing—happened in the backend terminal. The silence was deafening. My initial instinct was to blame a communication error, but the truth was far more subtle. After reviewing the code, I discovered a crucial detail: the frontend's save function was a placeholder. It was designed to simulate a successful save with a simple pop-up, but it was not actually sending a network request to the backend. It was a good reminder that just because an interface looks functional, it doesn't mean the underlying systems are connected.&lt;/p&gt;

&lt;p&gt;The fix was to replace the placeholder with a proper fetch request, instructing the frontend to send the user's data to the backend endpoint. But with this correction came a new error: the dreaded "EADDRINUSE" message. This meant a ghost process was still occupying the server port, preventing my new, corrected server from starting. Debugging this required a methodical approach, checking for active processes, identifying the culprit, and terminating it before successfully restarting the server. It wasn't a complex fix, but it required persistence to get the system into the right, clean state.&lt;/p&gt;

&lt;p&gt;Finally, with both my frontend and backend running, I clicked the "Save" button one last time. I watched my backend terminal as if it were a live status board. And there it was—a new line of text, a console.log message displaying the data I had just entered from my browser.&lt;/p&gt;

&lt;p&gt;This seemingly small achievement—a line of text in a terminal—represented much more. It was a tangible confirmation that the full-stack system was connected and working as intended. The entire process, from identifying the initial placeholder code to meticulously clearing a stuck port, was a testament to the methodical and resilient approach required for technical development. This kind of work isn't just about writing code; it's about building and debugging systems, and it's a foundational skill for anyone looking to make a meaningful impact in the field.&lt;/p&gt;

&lt;p&gt;With this vital connection established, the real work can now begin: adding the actual logic to the backend to create an Azure DevOps project via Infrastructure as Code. The foundation is solid, and the path forward is clear.&lt;br&gt;
[A screenshot of the backend terminal, showing the successful console.log message. This confirms that the frontend application has successfully sent data to the backend.".]&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff9hvvmgzgza9cgq1f2qg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff9hvvmgzgza9cgq1f2qg.png" alt=" " width="800" height="454"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Building an Azure CI/CD Dashboard: Errors, Solutions, and Lessons Learned</title>
      <dc:creator>Bolarinwa Olayinka</dc:creator>
      <pubDate>Thu, 24 Jul 2025 22:23:29 +0000</pubDate>
      <link>https://dev.to/bolarinwaolayinka/building-an-azure-cicd-dashboard-errors-solutions-and-lessons-learned-5b5h</link>
      <guid>https://dev.to/bolarinwaolayinka/building-an-azure-cicd-dashboard-errors-solutions-and-lessons-learned-5b5h</guid>
      <description>&lt;p&gt;In my journey to build a meaningful Azure CI/CD dashboard as part of my product-led platform, I faced several technical challenges and errors along the way. These obstacles became valuable learning experiences that helped me deepen my understanding of React development, npm, and continuous integration workflows. This blog post walks you through some common errors I encountered, how I diagnosed and fixed them, and the overall significance of these steps in delivering a functional dashboard.&lt;/p&gt;

&lt;p&gt;Setting Up the React Project&lt;br&gt;
I started with a React frontend intended to visualize CI/CD pipeline statuses, infrastructure deployment states, and user management info. The idea was to build a dashboard that clearly communicated the progress and health of a cloud-native product development environment.&lt;/p&gt;

&lt;p&gt;Initially, I ran the following command to start the development server:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm start&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;However, I immediately ran into an error:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm ERR! enoent Could not read package.json: Error: ENOENT: no such file or directory, open '/workspaces/azure-terraform-setup/package.json&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This meant that npm could not find the package.json file in my current directory. Since package.json is essential for npm to manage dependencies and scripts, this error stopped me in my tracks.&lt;/p&gt;

&lt;p&gt;Solution: Navigate to the Correct Directory&lt;br&gt;
Upon inspecting my project structure, I realized that my React frontend was inside a frontend folder. The root directory didn't contain the package.json file, but frontend did. So I changed directory:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;br&gt;
cd frontend&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then I ran:&lt;/p&gt;

&lt;p&gt;npm start`&lt;/p&gt;

&lt;p&gt;Solution: Navigate to the Correct Directory&lt;br&gt;
Upon inspecting my project structure, I realized that my React frontend was inside a frontend folder. The root directory didn't contain the package.json file, but frontend did. So I changed directory:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;bash&lt;br&gt;
cd frontend&lt;code&gt;&lt;/code&gt;&lt;br&gt;
Then I ran:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;npm install&lt;br&gt;
npm start&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This correctly started the React development server.&lt;/p&gt;

&lt;p&gt;Missing index.js File Error&lt;br&gt;
Once inside the frontend directory, I was greeted with a new error after running npm start:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Could not find a required file.&lt;br&gt;
  Name: index.js&lt;br&gt;
  Searched in: /workspaces/azure-terraform-setup/frontend/src&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This error indicated that React’s build tools could not locate the entry point of the application — the index.js file inside the src folder.&lt;/p&gt;

&lt;p&gt;Solution: Create the src Directory and Entry File&lt;br&gt;
I checked and found that the src folder was missing. So I created it:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;br&gt;
mkdir src&lt;/code&gt;&lt;br&gt;
Then I created index.js inside src with basic ReactDOM rendering code:&lt;/p&gt;

&lt;p&gt;`import React from 'react';&lt;br&gt;
import ReactDOM from 'react-dom/client';&lt;br&gt;
import App from './App';&lt;/p&gt;

&lt;p&gt;const root = ReactDOM.createRoot(document.getElementById('root'));&lt;br&gt;
root.render();`&lt;/p&gt;

&lt;p&gt;This told React where to start rendering my components. Once I saved this, the npm start command successfully launched the app.&lt;/p&gt;

&lt;p&gt;Syntax Errors in App.js&lt;br&gt;
During development, I wrote a React component called App.js to display my dashboard. However, I encountered a Babel parser error:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;SyntaxError: /workspaces/azure-terraform-setup/frontend/src/App.js: Identifier 'React' has already been declared.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This usually means I had imported React multiple times in the same file.&lt;/p&gt;

&lt;p&gt;Solution: Remove Duplicate Imports&lt;br&gt;
I reviewed App.js and found that import React from 'react'; was declared twice. Removing the duplicate import fixed the error immediately.&lt;/p&gt;

&lt;p&gt;I also faced another syntax issue:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;SyntaxError: Missing semicolon. (67:3)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Surprisingly, I had mistakenly included a command like npm start inside my App.js file as if it were code, causing a syntax error.&lt;/p&gt;

&lt;p&gt;Solution: Clean up Code and Remove Erroneous Commands&lt;br&gt;
I carefully scanned my App.js and deleted any non-code commands mistakenly placed inside the file. This allowed Babel to parse and compile the file without issues.&lt;/p&gt;

&lt;p&gt;Dashboard Rendering the Same Content Repeatedly&lt;br&gt;
Initially, my React dashboard component was rendering the exact same information block five times, which wasn’t the intended behavior. I wanted to show multiple different information blocks such as infrastructure status, build status, and user management.&lt;/p&gt;

&lt;p&gt;Solution: Use an Array of Data Objects to Render Multiple Info Blocks&lt;br&gt;
I created a constant array infoBlocks with multiple objects, each representing a different dashboard section:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;const infoBlocks = [&lt;br&gt;
  {&lt;br&gt;
    title: "🚀 Azure CI/CD Platform",&lt;br&gt;
    description: "Welcome to your product dashboard.",&lt;br&gt;
    items: [&lt;br&gt;
      "✅ Infrastructure deployed with Terraform",&lt;br&gt;
      "✅ GitHub Actions connected",&lt;br&gt;
      "🧪 Add environments, users, or services here",&lt;br&gt;
    ],&lt;br&gt;
  },&lt;br&gt;
  {&lt;br&gt;
    title: "🔧 Build Status",&lt;br&gt;
    description: "Check your latest builds.",&lt;br&gt;
    items: [&lt;br&gt;
      "✅ Last build passed",&lt;br&gt;
      "⏳ 2 builds in queue",&lt;br&gt;
      "❌ 1 failed build needs review",&lt;br&gt;
    ],&lt;br&gt;
  },&lt;br&gt;
  {&lt;br&gt;
    title: "👥 User Management",&lt;br&gt;
    description: "Manage your team and permissions.",&lt;br&gt;
    items: [&lt;br&gt;
      "🟢 12 active users",&lt;br&gt;
      "🔒 3 pending invitations",&lt;br&gt;
      "🛠️ Admin roles assigned",&lt;br&gt;
    ],&lt;br&gt;
  },&lt;br&gt;
];&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;br&gt;
Then, inside the App component, I mapped over this array to render distinct content blocks instead of repeating the same one.&lt;/p&gt;

&lt;p&gt;This approach made the dashboard much more meaningful and visually informative.&lt;/p&gt;

&lt;p&gt;Encountering Development Build Warnings&lt;br&gt;
When I ran the app in development mode, the terminal showed:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;Note that the development build is not optimized.&lt;br&gt;
To create a production build, use npm run build.&lt;/p&gt;

&lt;p&gt;webpack compiled successfully&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Understanding the Warning&lt;br&gt;
This is a normal message from React’s build system. It informs developers that the current build is optimized for debugging and fast rebuilds, but it is not suitable for production deployment because it is larger and slower.&lt;/p&gt;

&lt;p&gt;Key Takeaways from Errors and Solutions&lt;br&gt;
Always check your current directory when running npm commands to ensure you are in the folder containing package.json.&lt;/p&gt;

&lt;p&gt;React requires a src/index.js file as the entry point. Creating this file is necessary if missing.&lt;/p&gt;

&lt;p&gt;Watch out for duplicate imports and non-JavaScript commands mistakenly placed in source code.&lt;/p&gt;

&lt;p&gt;Use data-driven rendering for components when you want to display multiple different info blocks dynamically.&lt;/p&gt;

&lt;p&gt;Understand that development build warnings are normal and can be explained as part of your development workflow.&lt;/p&gt;

&lt;p&gt;Conclusion&lt;br&gt;
Building a dashboard for an Azure CI/CD platform was both rewarding and educational. The errors and challenges I faced along the way, such as missing files, syntax mistakes, and incorrect rendering, helped me solidify best practices in React development and npm project management.&lt;/p&gt;

&lt;p&gt;By overcoming these obstacles, I have built a meaningful, functional dashboard that visually represents vital CI/CD and user management information. This experience positions me well to continue delivering scalable, user-friendly cloud products.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to Deploy an Azure Linux Virtual Machine Using Terraform</title>
      <dc:creator>Bolarinwa Olayinka</dc:creator>
      <pubDate>Sat, 19 Jul 2025 18:43:04 +0000</pubDate>
      <link>https://dev.to/bolarinwaolayinka/how-to-deploy-an-azure-linux-virtual-machine-using-terraform-3bd4</link>
      <guid>https://dev.to/bolarinwaolayinka/how-to-deploy-an-azure-linux-virtual-machine-using-terraform-3bd4</guid>
      <description>&lt;p&gt;Architecture Overview&lt;/p&gt;

&lt;p&gt;+---------------------------+&lt;br&gt;
|      Resource Group       |  &amp;lt;-- Logical container for all resources&lt;br&gt;
|      (myresourcegroup)    |&lt;br&gt;
+---------------------------+&lt;br&gt;
            |&lt;br&gt;
            | contains&lt;br&gt;
            v&lt;br&gt;
+---------------------------+&lt;br&gt;
|     Virtual Network       |  &amp;lt;-- Custom address space: 10.0.0.0/16&lt;br&gt;
|       (mynetwork)         |&lt;br&gt;
+---------------------------+&lt;br&gt;
            |&lt;br&gt;
            | contains subnet&lt;br&gt;
            v&lt;br&gt;
+---------------------------+&lt;br&gt;
|          Subnet           |  &amp;lt;-- Internal subnet: 10.0.2.0/24&lt;br&gt;
|         (internal)        |&lt;br&gt;
+---------------------------+&lt;br&gt;
            |&lt;br&gt;
            | connected to&lt;br&gt;
            v&lt;br&gt;
+---------------------------+          +-------------------------+&lt;br&gt;
|   Network Interface (NIC) | &amp;lt;------&amp;gt; |     Public IP Address    |  &amp;lt;-- Static, Standard SKU public IP&lt;br&gt;
|         (mynic)           |          |         (mypip)          |&lt;br&gt;
+---------------------------+          +-------------------------+&lt;br&gt;
            |&lt;br&gt;
            | attached to&lt;br&gt;
            v&lt;br&gt;
+---------------------------+&lt;br&gt;
|   Linux Virtual Machine   |  &amp;lt;-- Ubuntu 22.04 LTS VM&lt;br&gt;
|          (myvm)           |&lt;br&gt;
+---------------------------+&lt;br&gt;
Introduction&lt;/p&gt;

&lt;p&gt;In this guide, I’ll walk you through how to deploy a Linux Virtual Machine (VM) on Microsoft Azure using Terraform — an Infrastructure as Code (IaC) tool.&lt;/p&gt;

&lt;p&gt;This example sets up:&lt;/p&gt;

&lt;p&gt;A Resource Group&lt;/p&gt;

&lt;p&gt;Virtual Network&lt;/p&gt;

&lt;p&gt;Subnet&lt;/p&gt;

&lt;p&gt;Public IP&lt;/p&gt;

&lt;p&gt;Network Interface&lt;/p&gt;

&lt;p&gt;Linux VM&lt;br&gt;
Prerequisites&lt;br&gt;
Before you begin, ensure you have:&lt;/p&gt;

&lt;p&gt;Azure CLI installed and logged in&lt;/p&gt;

&lt;p&gt;Terraform installed&lt;/p&gt;

&lt;p&gt;An active Azure subscription&lt;/p&gt;

&lt;p&gt;Terraform Configuration&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;terraform&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;required_providers&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;azurerm&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;source&lt;/span&gt;  &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"hashicorp/azurerm"&lt;/span&gt;
      &lt;span class="nx"&gt;version&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"~&amp;gt; 4.0"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;provider&lt;/span&gt; &lt;span class="s2"&gt;"azurerm"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;features&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use environment variables or a secret manager for production&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;  &lt;span class="nx"&gt;subscription_id&lt;/span&gt; &lt;span class="err"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"&amp;lt;your-subscription-id&amp;gt;"&lt;/span&gt;
  &lt;span class="nx"&gt;tenant_id&lt;/span&gt;       &lt;span class="err"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"&amp;lt;your-tenant-id&amp;gt;"&lt;/span&gt;
  &lt;span class="nx"&gt;client_id&lt;/span&gt;       &lt;span class="err"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"&amp;lt;your-client-id&amp;gt;"&lt;/span&gt;
  &lt;span class="nx"&gt;client_secret&lt;/span&gt;   &lt;span class="err"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"&amp;lt;your-client-secret&amp;gt;"&lt;/span&gt;
&lt;span class="err"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;variable&lt;/span&gt; &lt;span class="s2"&gt;"prefix"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;default&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"ybeedigital"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Infrastructure Resources&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Resource Group
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;resource&lt;/span&gt;&lt;span class="s2"&gt;"azurerm_resource_group"&lt;/span&gt; &lt;span class="s2"&gt;"myrg"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;name&lt;/span&gt;     &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"${var.prefix}-resources"&lt;/span&gt;
  &lt;span class="nx"&gt;location&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"UK South"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt; &lt;span class="nx"&gt;Virtual&lt;/span&gt; &lt;span class="nx"&gt;Network&lt;/span&gt; &lt;span class="nx"&gt;and&lt;/span&gt; &lt;span class="nx"&gt;Subnet&lt;/span&gt;

&lt;span class="nx"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"azurerm_virtual_network"&lt;/span&gt; &lt;span class="s2"&gt;"main"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;name&lt;/span&gt;                &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"${var.prefix}-network"&lt;/span&gt;
  &lt;span class="nx"&gt;address_space&lt;/span&gt;       &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"10.0.0.0/16"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="nx"&gt;location&lt;/span&gt;            &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;azurerm_resource_group&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;myrg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;location&lt;/span&gt;
  &lt;span class="nx"&gt;resource_group_name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;azurerm_resource_group&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;myrg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"azurerm_subnet"&lt;/span&gt; &lt;span class="s2"&gt;"internal"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;name&lt;/span&gt;                 &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"internal"&lt;/span&gt;
  &lt;span class="nx"&gt;resource_group_name&lt;/span&gt;  &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;azurerm_resource_group&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;myrg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;
  &lt;span class="nx"&gt;virtual_network_name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;azurerm_virtual_network&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;main&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;
  &lt;span class="nx"&gt;address_prefixes&lt;/span&gt;     &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"10.0.2.0/24"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="err"&gt;.&lt;/span&gt; &lt;span class="nx"&gt;Public&lt;/span&gt; &lt;span class="nx"&gt;IP&lt;/span&gt;

&lt;span class="nx"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"azurerm_public_ip"&lt;/span&gt; &lt;span class="s2"&gt;"main"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;name&lt;/span&gt;                &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"${var.prefix}-pip"&lt;/span&gt;
  &lt;span class="nx"&gt;location&lt;/span&gt;            &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;azurerm_resource_group&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;myrg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;location&lt;/span&gt;
  &lt;span class="nx"&gt;resource_group_name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;azurerm_resource_group&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;myrg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;
  &lt;span class="nx"&gt;allocation_method&lt;/span&gt;   &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Static"&lt;/span&gt;
  &lt;span class="nx"&gt;sku&lt;/span&gt;                 &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Standard"&lt;/span&gt;
  &lt;span class="nx"&gt;idle_timeout_in_minutes&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;

  &lt;span class="nx"&gt;tags&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;environment&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"staging"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Network Interface
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;resource&lt;/span&gt;&lt;span class="s2"&gt;"azurerm_network_interface"&lt;/span&gt; &lt;span class="s2"&gt;"main"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;name&lt;/span&gt;                &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"${var.prefix}-nic"&lt;/span&gt;
  &lt;span class="nx"&gt;location&lt;/span&gt;            &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;azurerm_resource_group&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;myrg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;location&lt;/span&gt;
  &lt;span class="nx"&gt;resource_group_name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;azurerm_resource_group&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;myrg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;

  &lt;span class="nx"&gt;ip_configuration&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;name&lt;/span&gt;                          &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"internal"&lt;/span&gt;
    &lt;span class="nx"&gt;subnet_id&lt;/span&gt;                     &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;azurerm_subnet&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;internal&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;
    &lt;span class="nx"&gt;private_ip_address_allocation&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Dynamic"&lt;/span&gt;
    &lt;span class="nx"&gt;public_ip_address_id&lt;/span&gt;          &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;azurerm_public_ip&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;main&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Linux Virtual Machine
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;resource&lt;/span&gt;&lt;span class="s2"&gt;"azurerm_linux_virtual_machine"&lt;/span&gt; &lt;span class="s2"&gt;"main"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;name&lt;/span&gt;                  &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"${var.prefix}-vm"&lt;/span&gt;
  &lt;span class="nx"&gt;location&lt;/span&gt;              &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;azurerm_resource_group&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;myrg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;location&lt;/span&gt;
  &lt;span class="nx"&gt;resource_group_name&lt;/span&gt;   &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;azurerm_resource_group&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;myrg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;
  &lt;span class="nx"&gt;network_interface_ids&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;azurerm_network_interface&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;main&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="nx"&gt;size&lt;/span&gt;                  &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Standard_B1s"&lt;/span&gt;
  &lt;span class="nx"&gt;admin_username&lt;/span&gt;        &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"adminuser"&lt;/span&gt;
  &lt;span class="nx"&gt;admin_password&lt;/span&gt;        &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"P@ssw0rd123!"&lt;/span&gt;  &lt;span class="c1"&gt;# Replace in production with SSH keys&lt;/span&gt;

  &lt;span class="nx"&gt;os_disk&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;caching&lt;/span&gt;              &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"ReadWrite"&lt;/span&gt;
    &lt;span class="nx"&gt;storage_account_type&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Standard_LRS"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;source_image_reference&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;publisher&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"Canonical"&lt;/span&gt;
    &lt;span class="nx"&gt;offer&lt;/span&gt;     &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"0001-com-ubuntu-server-jammy"&lt;/span&gt;
    &lt;span class="nx"&gt;sku&lt;/span&gt;       &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"22_04-lts"&lt;/span&gt;
    &lt;span class="nx"&gt;version&lt;/span&gt;   &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"latest"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;computer_name&lt;/span&gt;                  &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"${var.prefix}-vm"&lt;/span&gt;
  &lt;span class="nx"&gt;disable_password_authentication&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;

  &lt;span class="nx"&gt;tags&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;environment&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"staging"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Optional: SSH Authentication (Recommended)&lt;br&gt;
Instead of a password, use an SSH key:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;admin_ssh_key&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;username&lt;/span&gt;   &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"adminuser"&lt;/span&gt;
  &lt;span class="nx"&gt;public_key&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"~/.ssh/id_rsa.pub"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;disable_password_authentication&lt;/span&gt; &lt;span class="err"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;How to Deploy&lt;br&gt;
Initialize Terraform&lt;/p&gt;

&lt;p&gt;terraform init&lt;br&gt;
Preview the changes&lt;/p&gt;

&lt;p&gt;terraform plan&lt;br&gt;
Apply the configuration&lt;/p&gt;

&lt;p&gt;terraform apply&lt;/p&gt;

&lt;p&gt;Conclusion&lt;br&gt;
Using Terraform to deploy infrastructure on Azure automates your setup process and ensures consistency, repeatability, and easy scalability.&lt;/p&gt;

&lt;p&gt;This guide showed you how to provision a Linux Virtual Machine along with essential networking components, all managed as code. As your infrastructure grows, you can extend this foundation with services like:&lt;/p&gt;

&lt;p&gt;Azure Key Vault&lt;/p&gt;

&lt;p&gt;Azure Monitor&lt;/p&gt;

&lt;p&gt;Managed PostgreSQL/MySQL databases&lt;/p&gt;

&lt;p&gt;Load Balancers&lt;/p&gt;

&lt;p&gt;VM Scale Sets&lt;/p&gt;

&lt;p&gt;Embrace Infrastructure as Code with Terraform to streamline your cloud operations and accelerate deployment. Happy building!&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
