<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TechieRoop</title>
	<atom:link href="https://techieroop.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://techieroop.com</link>
	<description>Cloud Engineering &#38; AI Automation</description>
	<lastBuildDate>Sun, 27 Sep 2026 12:54:20 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>

<image>
	<url>https://i0.wp.com/techieroop.com/wp-content/uploads/2021/04/cropped-android-chrome-512x512-1.png?fit=32%2C32&#038;ssl=1</url>
	<title>TechieRoop</title>
	<link>https://techieroop.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">192312049</site>	<item>
		<title>The Ultimate Guide to Kibana Spaces and Elasticsearch Multi-Tenancy</title>
		<link>https://techieroop.com/enterprise-guide-to-kibana-spaces-and-elasticsearch-multi-tenancy/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=enterprise-guide-to-kibana-spaces-and-elasticsearch-multi-tenancy</link>
					<comments>https://techieroop.com/enterprise-guide-to-kibana-spaces-and-elasticsearch-multi-tenancy/#respond</comments>
		
		<dc:creator><![CDATA[Roopendra]]></dc:creator>
		<pubDate>Thu, 24 Sep 2026 05:28:02 +0000</pubDate>
				<category><![CDATA[ELK]]></category>
		<category><![CDATA[Kibana]]></category>
		<category><![CDATA[kibana]]></category>
		<guid isPermaLink="false">https://techieroop.com/?p=1503</guid>

					<description><![CDATA[<p>Learn how to scale a centralized Elastic platform to 50+ business units using Kibana Spaces, DLS/FLS for data security, and data stream ingestion chargebacks.</p>
<p>The post <a href="https://techieroop.com/enterprise-guide-to-kibana-spaces-and-elasticsearch-multi-tenancy/">The Ultimate Guide to Kibana Spaces and Elasticsearch Multi-Tenancy</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></description>
										<content:encoded><![CDATA[<h2 class="wp-block-heading"><strong>Multi-Tenant Elastic Architecture: How to Scale to 50+ Business Units Safely</strong></h2>



<p class="wp-block-paragraph">Managing a centralized log and metrics platform for an enterprise with dozens of business units is challenging. When teams rely on a single platform, coordination becomes difficult. Kibana Space helps organize spaces for different groups, improving governance. This structure supports audits and cross-team collaboration.</p>



<p class="wp-block-paragraph">Visual dashboard clutter slows analysis and hides critical trends. Accidental configuration overwrites threaten stability and compliance with sensitive data like PCI-DSS. Unclear infrastructure cost attribution complicates budgeting.</p>



<p class="wp-block-paragraph">If your first instinct is to spin up <strong>50 distinct physical Elasticsearch clusters</strong>, stop right there.</p>



<p class="wp-block-paragraph">Building isolated infrastructure for every department creates an operational nightmare. It fragments your data engineering resources, and it skyrockets cloud spend. Instead, the industry standard is to deploy a single, resilient Elastic platform and partition it using a three-tier multi-tenancy model. This approach aligns with Kibana Space and preserves centralized control.</p>



<p class="wp-block-paragraph">Here is the exact blueprint to architect a clean, secure, and cost-transparent enterprise platform.</p>



<h2 class="wp-block-heading"><strong>1. Clean Up the User Interface with Kibana Spaces</strong></h2>



<p class="wp-block-paragraph">Placing 50 separate engineering teams into the same default Kibana Space dashboard environment causes immediate friction.</p>



<p class="wp-block-paragraph">Teams will inadvertently delete each other’s visualizations, and finding a specific dashboard becomes an exercise in frustration.</p>



<p class="wp-block-paragraph">The first layer of isolation happens at the presentation layer using <strong>Kibana Spaces</strong>.</p>



<p class="wp-block-paragraph">Think of Kibana Spaces as custom virtual apartments inside one large apartment building:</p>



<ul class="wp-block-list">
<li class=""><strong>Logical Workspace Isolation:</strong> You provision dedicated spaces aligned with business verticals or domains (e.g., space-payments, space-logistics). Inside their assigned space, teams customize dashboards, saved objects, and alerts without interfering with anyone else.</li>



<li class=""><strong>Shared Performance, Zero Overhead:</strong> All spaces leverage the same underlying Elasticsearch data cluster. There is zero hardware overhead or extra infrastructure to maintain.</li>



<li class=""><strong>Tailored UI Experiences:</strong> If your logistics team only needs APM metrics and basic dashboards, administrators can toggle off advanced developer tools or security applications strictly within that space to declutter the sidebar.</li>
</ul>



<h2 class="wp-block-heading"><strong>2. Secure Data Access with Identity Mapping, DLS, and FLS</strong></h2>



<p class="wp-block-paragraph">While Kibana Spaces clean up what users see on the screen, they do not secure the underlying data layer. To ensure strict data privacy and zero-trust security, you need robust backend guardrails.</p>



<p class="wp-block-paragraph">Instead of manually onboarding thousands of enterprise employees, map your corporate identity provider (<strong>SAML, OIDC, Active Directory, Azure AD, or</strong> ) directly to Elastic roles. Once identity mapping is established, you can enforce security down to the individual document and field level.</p>



<h2 class="wp-block-heading"><strong>Document-Level Security (DLS): Who Can See What Rows?</strong></h2>



<p class="wp-block-paragraph">DLS restricts document visibility using Lucene query scopes. For example, when a retail banking analyst queries the global log stream, the backend implicitly injects a filter ensuring they only see logs matching their specific tenant ID.</p>



<p class="wp-block-paragraph">{<br>&nbsp; &#8220;indices&#8221;: [<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &#8220;names&#8221;: [&#8220;logs-*-*&#8221;],<br>&nbsp; &nbsp; &nbsp; &#8220;privileges&#8221;: [&#8220;read&#8221;],<br>&nbsp; &nbsp; &nbsp; &#8220;query&#8221;: &#8220;{\&#8221;term\&#8221;: { \&#8221;tenant.id\&#8221;: \&#8221;retail-banking\&#8221; }}&#8221;<br>&nbsp; &nbsp; }<br>&nbsp; ]<br>}<br></p>



<h2 class="wp-block-heading"><strong>Field-Level Security (FLS): Masking Sensitive Data for Compliance</strong></h2>



<p class="wp-block-paragraph">To maintain PCI-DSS or GDPR compliance, you must prevent unauthorized eyes from seeing Personally Identifiable Information (PII). FLS acts as an automated blackout marker. It can grant full access to general metadata fields while explicitly blacklisting sensitive strings like credit card numbers or Social Security Numbers (SSNs).</p>



<p class="wp-block-paragraph">{<br>&nbsp; &#8220;indices&#8221;: [<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &#8220;names&#8221;: [&#8220;logs-payments-*&#8221;],<br>&nbsp; &nbsp; &nbsp; &#8220;privileges&#8221;: [&#8220;read&#8221;],<br>&nbsp; &nbsp; &nbsp; &#8220;field_security&#8221;: {<br>&nbsp; &nbsp; &nbsp; &nbsp; &#8220;grant&#8221;: [&#8220;*&#8221;],<br>&nbsp; &nbsp; &nbsp; &nbsp; &#8220;except&#8221;: [&#8220;payment.card_number&#8221;, &#8220;customer.ssn&#8221;]<br>&nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; }<br>&nbsp; ]<br>}<br></p>



<h2 class="wp-block-heading"><strong>3. Implement Chargeback and Showback Ingestion Governance</strong></h2>



<p class="wp-block-paragraph">When running a massive, shared cluster, individual business units must have clear visibility into their resource consumption. You cannot sustain a centralized platform model long-term without an objective cost attribution system.</p>



<p class="wp-block-paragraph">solves this seamlessly by tracking data stream statistics out of the box. By querying the cluster&#8217;s data stream endpoints, you can track exactly how many ingestion bytes each department consumes:</p>



<p class="wp-block-paragraph">GET /_data_stream/logs-*/_stats<br></p>



<h2 class="wp-block-heading"><strong>Automating Cost Attribution</strong></h2>



<p class="wp-block-paragraph">To turn raw bytes into actionable business intelligence, platform teams can deploy a simple automated script or an internal audit dashboard:</p>



<ol class="wp-block-list">
<li class=""><strong>Daily Footprint Tracking:</strong> The automation reads the metadata byte counts per data stream every 24 hours.</li>



<li class=""><strong>Granular Breakdown:</strong> The script groups ingestion volume by explicit metadata tags like or tenant.id.</li>



<li class=""><strong>Monthly Financial Models:</strong> At the end of the billing cycle, the system generates custom cost attribution reports, allowing you to easily bill back cloud infrastructure spend to the corresponding business units based on actual usage.</li>
</ol>



<h2 class="wp-block-heading"><strong>Summary: The Blueprint at a Glance</strong></h2>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>Security &amp; Governance Strategy</th><th>Implementation Tier</th><th>Core Business Value</th></tr></thead><tbody><tr><td><strong>Kibana Spaces</strong></td><td>Presentation / UI Layer</td><td>Eliminates clutter; customizes user experiences.</td></tr><tr><td><strong>Document-Level Security (DLS)</strong></td><td>Row-Level Data Layer</td><td>Isolates tenant datasets automatically within shared indices.</td></tr><tr><td><strong>Field-Level Security (FLS)</strong></td><td>Column-Level Data Layer</td><td>Redacts PCI-DSS/PII data to ensure compliance.</td></tr><tr><td><strong>Data Stream Stats Integration</strong></td><td>Infrastructure Governance</td><td>Provides accurate data to drive monthly chargeback models.</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">By separating the visual workspaces, strictly enforcing data-level compliance, and implementing transparent consumption tracking, you can scale a single Elastic deployment to support over 50 business units efficiently, securely, and cost-effectively.</p><p>The post <a href="https://techieroop.com/enterprise-guide-to-kibana-spaces-and-elasticsearch-multi-tenancy/">The Ultimate Guide to Kibana Spaces and Elasticsearch Multi-Tenancy</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://techieroop.com/enterprise-guide-to-kibana-spaces-and-elasticsearch-multi-tenancy/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1503</post-id>	</item>
		<item>
		<title>Mastering Multi-Tenant Access Control in Kibana Spaces</title>
		<link>https://techieroop.com/multi-tenant-access-control-with-kibana-spaces/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=multi-tenant-access-control-with-kibana-spaces</link>
					<comments>https://techieroop.com/multi-tenant-access-control-with-kibana-spaces/#respond</comments>
		
		<dc:creator><![CDATA[Roopendra]]></dc:creator>
		<pubDate>Thu, 24 Sep 2026 05:13:12 +0000</pubDate>
				<category><![CDATA[ELK]]></category>
		<category><![CDATA[Kibana]]></category>
		<category><![CDATA[kibana]]></category>
		<guid isPermaLink="false">https://techieroop.com/?p=1499</guid>

					<description><![CDATA[<p>However, as organizations scale, managing a shared data platform across Finance, Marketing, and Operations can quickly become chaotic. Moreover, without proper segmentation, teams sift through irrelevant dashboards. Kibana helps by preventing accidental modifications and guarding access to sensitive data. Fortunately, you don’t need to deploy separate infrastructure for every department. By leveraging Kibana Spaces alongside...</p>
<p>The post <a href="https://techieroop.com/multi-tenant-access-control-with-kibana-spaces/">Mastering Multi-Tenant Access Control in Kibana Spaces</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></description>
										<content:encoded><![CDATA[<p class="wp-block-paragraph">However, as organizations scale, managing a shared data platform across Finance, Marketing, and Operations can quickly become chaotic.</p>



<p class="wp-block-paragraph">Moreover, without proper segmentation, teams sift through irrelevant dashboards.</p>



<p class="wp-block-paragraph">Kibana helps by preventing accidental modifications and guarding access to sensitive data.</p>



<p class="wp-block-paragraph">Fortunately, you don’t need to deploy separate infrastructure for every department. By leveraging Kibana Spaces alongside Elastic&#8217;s robust RBAC, you can create isolated, secure environments for each business vertical while keeping your underlying deployment unified.</p>



<h2 class="wp-block-heading"><strong>What is a Kibana Space?</strong></h2>



<p class="wp-block-paragraph">A <strong>Kibana Space</strong> is a virtual container within a single Kibana instance that lets you organize and partition your saved objects.</p>



<ul class="wp-block-list">
<li class=""><strong>Logical Isolation:</strong> Dashboards, visualizations, data views, and canvas workpads are kept completely separate. A dashboard built in the <em>Finance</em> space remains entirely invisible to users in the <em>Marketing</em> space.</li>



<li class=""><strong>Shared Performance:</strong> All spaces share the same backend Elasticsearch cluster, meaning zero hardware overhead or duplicate maintenance.</li>



<li class=""><strong>Tailored User Experiences:</strong> If the Marketing team only needs the <em>Dashboard</em> app and doesn&#8217;t use advanced developer tools, administrators can disable unused applications strictly within that space.</li>
</ul>



<h2 class="wp-block-heading"><strong>Blueprint: Implementing Multi-Vertical Access Control</strong></h2>



<p class="wp-block-paragraph">To securely separate workspaces based on business verticals, align your Kibana Spaces (view layer) with Elasticsearch Roles (data layer). Additionally, here is the step-by-step implementation guide.</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1218" height="698" src="https://i0.wp.com/techieroop.com/wp-content/uploads/2026/09/image.png?fit=1024%2C587&amp;ssl=1" alt="" class="wp-image-1500" srcset="https://i0.wp.com/techieroop.com/wp-content/uploads/2026/09/image.png?w=1218&amp;ssl=1 1218w, https://i0.wp.com/techieroop.com/wp-content/uploads/2026/09/image.png?resize=300%2C172&amp;ssl=1 300w, https://i0.wp.com/techieroop.com/wp-content/uploads/2026/09/image.png?resize=1024%2C587&amp;ssl=1 1024w, https://i0.wp.com/techieroop.com/wp-content/uploads/2026/09/image.png?resize=768%2C440&amp;ssl=1 768w" sizes="(max-width: 640px) 100vw, 640px" /></figure>



<h2 class="wp-block-heading">Step 1: Initialize Dedicated Spaces</h2>



<p class="wp-block-paragraph">First, set up clean virtual boundaries for each team.</p>



<ol class="wp-block-list">
<li class="">Navigate to <strong>Stack Management</strong> &gt; <strong>Spaces</strong> in .</li>



<li class="">Click <strong>Create a space</strong>.</li>



<li class="">Name your space (e.g., Finance-Vertical or Marketing-Vertical).</li>



<li class="">Under <strong>Customize features</strong>, toggle off any applications that the team does not require to declutter their sidebar.</li>
</ol>



<h2 class="wp-block-heading">Step 2: Restrict Data Privileges (Elasticsearch Layer)</h2>



<p class="wp-block-paragraph">Since all spaces pull from the same cluster, data-level boundaries prevent a user from seeing another team&#8217;s raw logs.</p>



<p class="wp-block-paragraph">Moreover, these boundaries enforce data isolation.</p>



<ol class="wp-block-list">
<li class="">Go to <strong>Stack Management</strong> &gt; <strong>Roles</strong> and click <strong>Create role</strong>.</li>



<li class="">Name the role according to the department (e.g., finance_analyst_role).</li>



<li class="">Under <strong>Index privileges</strong>, specify the exact index pattern for that vertical (e.g., logs-finance-* or metrics-finance-*).</li>



<li class="">Grant the required data permissions—typically read and view_index_metadata.</li>
</ol>



<h2 class="wp-block-heading">Step 3: Link Spaces to Roles (Kibana Layer)</h2>



<p class="wp-block-paragraph">Now, tie the data restrictions back to the visual workspace. Additionally, this links the restrictions to the visual workspace.</p>



<ol class="wp-block-list">
<li class="">Within the same role configuration page, locate <strong>Kibana privileges</strong>.</li>



<li class="">Click <strong>Add Kibana privilege</strong>.</li>



<li class="">From the <strong>Spaces</strong> drop-down, select the dedicated space you created in Step 1 (e.g., Finance-Vertical).</li>



<li class="">Set the access level. Granting All allows the team to build dashboards within their container, while Read limits them to viewing existing data.</li>
</ol>



<h2 class="wp-block-heading"><strong>Step 4: Provision User Access</strong></h2>



<p class="wp-block-paragraph">Finally, additionally assign your users to their respective roles.</p>



<ol class="wp-block-list">
<li class="">Go to <strong>Stack Management</strong> &gt; <strong>Users</strong>.</li>



<li class="">Create or select a user account.</li>



<li class="">Assign them their vertical&#8217;s custom role (e.g., finance_analyst_role).</li>
</ol>



<h2 class="wp-block-heading"><strong>The Result</strong></h2>



<p class="wp-block-paragraph">The next time a Finance analyst logs in, they are dropped into an environment containing only finance-focused dashboards in Kibana. Additionally, they remain entirely unaware that a Marketing space exists. It creates a seamless, secure, and focused user experience.</p><p>The post <a href="https://techieroop.com/multi-tenant-access-control-with-kibana-spaces/">Mastering Multi-Tenant Access Control in Kibana Spaces</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://techieroop.com/multi-tenant-access-control-with-kibana-spaces/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1499</post-id>	</item>
		<item>
		<title>What Is an Essential Error Budget? A Practical Guide</title>
		<link>https://techieroop.com/what-is-error-budget/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=what-is-error-budget</link>
					<comments>https://techieroop.com/what-is-error-budget/#respond</comments>
		
		<dc:creator><![CDATA[Roopendra]]></dc:creator>
		<pubDate>Thu, 24 Sep 2026 04:58:38 +0000</pubDate>
				<category><![CDATA[SRE]]></category>
		<category><![CDATA[SLA]]></category>
		<category><![CDATA[SLI]]></category>
		<category><![CDATA[SLO]]></category>
		<guid isPermaLink="false">https://techieroop.com/?p=1495</guid>

					<description><![CDATA[<p>An error budget is the agreed-upon amount of unreliability, downtime, or failure a system can experience. This limit exists within a specific period before users are noticeably impacted or targets are broken. It is a core concept in Site Reliability Engineering (SRE) used to balance the speed of shipping new features with system stability. 📊...</p>
<p>The post <a href="https://techieroop.com/what-is-error-budget/">What Is an Essential Error Budget? A Practical Guide</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></description>
										<content:encoded><![CDATA[<figure class="wp-block-image size-large"><img data-recalc-dims="1" decoding="async" width="640" height="478" src="https://i0.wp.com/techieroop.com/wp-content/uploads/2026/09/Gemini_Generated_Image_kq7dqdkq7dqdkq7d.png?resize=640%2C478&#038;ssl=1" alt="" class="wp-image-1606"/></figure>



<p class="wp-block-paragraph">An error budget is the agreed-upon amount of unreliability, downtime, or failure a system can experience. This limit exists within a specific period before users are noticeably impacted or targets are broken.</p>



<p class="wp-block-paragraph">It is a core concept in Site Reliability Engineering (SRE) used to balance the speed of shipping new features with system stability.</p>



<h2 class="wp-block-heading"><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4ca.png" alt="📊" class="wp-smiley" style="height: 1em; max-height: 1em;" /> How It Works</strong></h2>



<ul class="wp-block-list">
<li class=""><strong>Derived from SLOs:</strong> Calculated as 100% minus your Service Level Objective (SLO).</li>



<li class=""><strong>The Math:</strong> If your availability SLO is 99.9% over a month, your error budget is 0.1%.</li>



<li class=""><strong>Real Time:</strong> For a 30-day month, 0.1% equals roughly 43 minutes of total allowable downtime.</li>
</ul>



<h2 class="wp-block-heading"><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2696.png" alt="⚖" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Why It Matters</strong></h2>



<ul class="wp-block-list">
<li class=""><strong>Permission to Fail:</strong> It removes the impossible goal of 100% uptime and treats small failures as normal.</li>



<li class=""><strong>Drives Decisions:</strong> Dictates whether a team should speed up feature releases or freeze deployments to fix reliability.&nbsp;</li>



<li class=""><strong>Reduces Conflict:</strong> Aligns developers (who want to ship fast) and operations teams (who want stability) under one shared metric.</li>
</ul>



<h2 class="wp-block-heading"><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4c9.png" alt="📉" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Managing the Budget</strong></h2>



<ul class="wp-block-list">
<li class=""><strong>Budget is Healthy:</strong> Teams freely ship new features, run experiments, and take risks.</li>



<li class=""><strong>Budget is Exhausted:</strong> Feature roll-outs pause, and all efforts shift toward bug fixes, refactoring, and stability. </li>
</ul><p>The post <a href="https://techieroop.com/what-is-error-budget/">What Is an Essential Error Budget? A Practical Guide</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://techieroop.com/what-is-error-budget/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1495</post-id>	</item>
		<item>
		<title>SRE Framework Guide for GKE Microservices (SLI, SLO &#038; SLA)</title>
		<link>https://techieroop.com/sre-framework-gke-microservices-sli-slo-sla/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sre-framework-gke-microservices-sli-slo-sla</link>
					<comments>https://techieroop.com/sre-framework-gke-microservices-sli-slo-sla/#respond</comments>
		
		<dc:creator><![CDATA[Roopendra]]></dc:creator>
		<pubDate>Thu, 24 Sep 2026 04:32:56 +0000</pubDate>
				<category><![CDATA[SRE]]></category>
		<category><![CDATA[ERRORBUDGET]]></category>
		<category><![CDATA[SLA]]></category>
		<category><![CDATA[SLI]]></category>
		<category><![CDATA[SLO]]></category>
		<guid isPermaLink="false">https://techieroop.com/?p=1479</guid>

					<description><![CDATA[<p>Learn how to calculate SLIs, define 30-day rolling SLOs, and write realistic SLAs for GKE microservices using Cloud Pub/Sub and Cloud Storage</p>
<p>The post <a href="https://techieroop.com/sre-framework-gke-microservices-sli-slo-sla/">SRE Framework Guide for GKE Microservices (SLI, SLO & SLA)</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></description>
										<content:encoded><![CDATA[<h2 class="wp-block-heading"><strong>Technical Guide: How to Design an SRE Framework for GKE Microservices (with Pub/Sub &amp; GCS)</strong></h2>



<figure class="wp-block-image size-full"><img data-recalc-dims="1" decoding="async" width="640" height="478" src="https://i0.wp.com/techieroop.com/wp-content/uploads/2026/09/Gemini_Generated_Image_wj390lwj390lwj39.png?resize=640%2C478&#038;ssl=1" alt="" class="wp-image-1609" srcset="https://i0.wp.com/techieroop.com/wp-content/uploads/2026/09/Gemini_Generated_Image_wj390lwj390lwj39.png?w=1000&amp;ssl=1 1000w, https://i0.wp.com/techieroop.com/wp-content/uploads/2026/09/Gemini_Generated_Image_wj390lwj390lwj39.png?resize=300%2C224&amp;ssl=1 300w, https://i0.wp.com/techieroop.com/wp-content/uploads/2026/09/Gemini_Generated_Image_wj390lwj390lwj39.png?resize=768%2C574&amp;ssl=1 768w" sizes="(max-width: 640px) 100vw, 640px" /></figure>



<p class="wp-block-paragraph">When deploying critical business logic onto , defining &#8220;uptime&#8221; can get complicated fast. If your containerized application crashes but your message queues are still buffering incoming traffic safely, is your platform actually down?</p>



<p class="wp-block-paragraph">To build a truly resilient software platform, you need a unified data vocabulary shared between engineering, product managers, and executive leadership. This comprehensive guide breaks down how to calculate, configure, and define <strong>Service Level Indicators (SLIs)</strong>, <strong>Service Level Objectives (SLOs)</strong>, and <strong>Service Level Agreements (SLAs)</strong> for a cloud-native microservice running in the us-central1 region backed by <strong>Cloud Pub/Sub</strong> and <strong>Cloud Storage (GCS)</strong>.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph">A single microservice rarely performs just one task. To measure cloud reliability accurately without creating alert fatigue, you must split your system architecture into two distinct <strong>Critical User Journeys (CUJs)</strong>:</p>



<ol class="wp-block-list">
<li class=""><strong>Synchronous Web Traffic:</strong> Real-time HTTP/gRPC API requests hitting your GKE ingress and routing to application pods.</li>



<li class=""><strong>Asynchronous Data Pipelines:</strong> Event-driven background processing that consumes streaming data from Pub/Sub topics and outputs batch files into Cloud Storage buckets.</li>
</ol>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph">Service Level Indicators (SLIs) are the raw operational data points showing how your cloud architecture is performing in real-time. Site Reliability Engineering (SRE) industry best practices dictate formatting SLIs as an explicit ratio: <strong>(Good Events / Total Valid Events) × 100</strong>.</p>



<h2 class="wp-block-heading"><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f5a5.png" alt="🖥" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Journey 1: Synchronous API Traffic Metrics</strong></h2>



<h2 class="wp-block-heading"><strong>1. Availability SLI Formula</strong></h2>



<p class="wp-block-paragraph">The percentage of valid HTTP requests handled successfully by your GKE workloads. We deliberately isolate internal server-side runtime errors (5xx) from standard user behavior.</p>



<pre class="wp-block-code"><code><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mtext>SLI</mtext><mtext>Avail</mtext></msub><mo>=</mo><mfrac><mrow><mo largeop="true" movablelimits="true">∑</mo><mtext>Rate</mtext><mo>(</mo><mtext>http_requests_total</mtext><mo>{</mo><mtext>status</mtext><mo>∼</mo><mtext>"2xx|</mtext><mrow></mrow><mtext>3xx|</mtext><mrow></mrow><mtext>4xx"</mtext><mo>}</mo><mo>&#91;</mo><mn>5</mn><mi>m</mi><mo>]</mo><mo>)</mo></mrow><mrow><mo largeop="true" movablelimits="true">∑</mo><mtext>Rate</mtext><mo>(</mo><mtext aria-owns="action-menu-parent-container">http_requests_to</mtext></mrow></mfrac></mrow></semantics></math>X 100</code></pre>



<h2 class="wp-block-heading"><strong>2. Latency SLI Formula</strong></h2>



<p class="wp-block-paragraph">The percentage of total API requests that complete processing faster than your defined application performance threshold (e.g., 200 milliseconds or 0.2s).</p>



<pre class="wp-block-code"><code><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mtext>SLI</mtext><mtext>Lat</mtext></msub><mo>=</mo><mfrac><mrow><mo largeop="true" movablelimits="true">∑</mo><mtext>Rate</mtext><mo>(</mo><mtext>http_request_duration_seconds_bucket</mtext><mo>{</mo><mtext>le</mtext><mo>∼</mo><mtext>"0.2"</mtext><mo>}</mo><mo>&#91;</mo><mn>5</mn><mi>m</mi><mo>]</mo><mo>)</mo></mrow><mrow><mo largeop="true" movablelimits="true">∑</mo><mtext>Rate</mtext><mo>(</mo><mtext>http_request_duration_seconds_count</mtext><mo>&#91;</mo><mn>5</mn><mi>m</mi><mo>]</mo></mrow></mfrac></mrow></semantics></math>X 100</code></pre>



<h2 class="wp-block-heading"><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/23f1.png" alt="⏱" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Journey 2: Asynchronous Event Processing Metrics</strong></h2>



<h2 class="wp-block-heading"><strong>3. Pipeline Freshness (Queue Age) SLI Formula</strong></h2>



<p class="wp-block-paragraph">For asynchronous background workers, counting HTTP status responses will not track performance issues. Instead, measure the maximum age of unacknowledged pipeline data inside <strong>Cloud Pub/Sub</strong> to ensure your system isn&#8217;t lagging during traffic spikes.</p>



<pre class="wp-block-code"><code><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mtext>SLI</mtext><mtext>Fresh</mtext></msub><mo>=</mo><mfrac><mrow><mtext>Count of messages processed where<span class="Apple-converted-space">&nbsp;</span></mtext><mo>(</mo><mtext>ack_time</mtext><mo>−</mo><mtext>publish_time</mtext><mo>)</mo><mo>≤</mo><mn>10</mn><mtext>s</mtext></mrow><mtext>Total messages acknowledged</mtext></mfrac><mo>×</mo><mn>100</mn></mrow></semantics></math></code></pre>



<p class="wp-block-paragraph"><em>SRE Implementation Tip:</em> In your , natively track this pipeline data using the :// platform metric.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph">Your Service Level Objectives (SLOs) are the precise, internal engineering targets your DevOps team aims to maintain. To protect against temporary anomalies, calculate these numbers over a <strong>rolling 30-day window</strong>.</p>



<figure class="wp-block-table"><table class="has-fixed-layout"><thead><tr><th>Critical User Journey / Metric</th><th>SLI Mathematical Specification</th><th>30-Day Rolling SLO Target</th><th>Monthly Error Budget (Allowed Failure Space)</th></tr></thead><tbody><tr><td><strong>User API Availability</strong></td><td>Successful responses / Total valid requests</td><td><strong>99.9%</strong></td><td><strong>0.1%</strong> (~43.2 minutes of total downtime)</td></tr><tr><td><strong>User API Latency</strong></td><td>HTTP response time ≤ 200ms</td><td><strong>95.0%</strong></td><td><strong>5.0%</strong> of total requests can be slow</td></tr><tr><td><strong>Pub/Sub Processing</strong></td><td>Oldest unacked message age ≤ 10s</td><td><strong>99.0%</strong></td><td><strong>1.0%</strong> of backlog processing time</td></tr></tbody></table></figure>



<h2 class="wp-block-heading"><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f6e1.png" alt="🛡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> How to Enforce the Error Budget Policy</strong></h2>



<p class="wp-block-paragraph">If your microservice encounters a critical outage or a memory leak that burns entirely through its <strong>0.1% availability error budget</strong>, it automatically activates your SRE team’s <strong>Feature Freeze policy</strong>.</p>



<p class="wp-block-paragraph">Under this framework, application developers pause shipping new application capabilities to production. Instead, they shift 100% of their operational velocity toward structural bug fixes, code optimization, and clearing out technical debt.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p class="wp-block-paragraph">Your Service Level Agreement (SLA) is the formal contract you sign with your paying enterprise clients. Breaching an SLA results in real financial consequences, such as issuing invoice refunds or service credits.</p>



<h2 class="wp-block-heading"><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f3d7.png" alt="🏗" class="wp-smiley" style="height: 1em; max-height: 1em;" /> The Infrastructure Dependency Reality Check</strong></h2>



<p class="wp-block-paragraph">When designing your external SLA, <strong>never promise higher uptime than your underlying infrastructure dependencies.</strong> Because this microservice architecture is deployed in us-central1, your software uptime is strictly bounded by Google Cloud&#8217;s infrastructure service agreements:</p>



<ul class="wp-block-list">
<li class=""></li>



<li class=""><strong>GKE Regional Control Plane SLA:</strong> 99.95% availability</li>



<li class=""><strong>Cloud Pub/Sub SLA:</strong> 99.95% availability</li>



<li class=""><strong>Cloud Storage (GCS Standard Regional) SLA:</strong> 99.9% availability</li>



<li class=""></li>
</ul>



<h2 class="wp-block-heading"><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4dd.png" alt="📝" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Recommended Enterprise Application SLA Template</strong></h2>



<p class="wp-block-paragraph">Because our internal engineering goal (SLO) is set to <strong>99.9%</strong>, our external contract (SLA) must include a safety buffer. We recommend setting your legally binding contractual commitment to <strong>99.5%</strong>.</p>



<p class="wp-block-paragraph">### 1. Core Service Commitment<br>The Microservice framework guarantees an Uptime Availability Rate of ≥ 99.5% during any given billing calendar month.<br><br>### 2. Measurement Exclusions<br>Uptime performance is verified at the GKE Ingress controller boundary. Outages stemming directly from global Cloud Pub/Sub routing failures or multi-zone regional Cloud Storage faults originating entirely within Google Cloud data centers are excluded from penalty calculations.<br><br>### 3. Financial Service Credits<br>If the tracked Monthly Uptime drops below the target percentage, customers are eligible to receive invoice credits:<br>* Monthly Availability &lt; 99.5% but ≥ 99.0%: 10% Service Credit applied to the monthly bill.<br>* Monthly Availability &lt; 99.0%: 25% Service Credit applied to the monthly bill.<br></p>



<ul class="wp-block-list">
<li class=""></li>



<li class=""><strong>SLIs</strong> calculate your precise technical data.</li>



<li class=""><strong>SLOs</strong> enforce internal team discipline using rolling error budgets to balance speed and platform safety.</li>



<li class=""><strong>SLAs</strong> protect your business from legal liabilities by keeping contractual uptime promises realistic.</li>



<li class=""></li>
</ul>



<p class="wp-block-paragraph">By tightly linking these three operational layers together, you protect your system engineers from alert fatigue while providing a transparently stable software product to your end users.</p>



<p class="wp-block-paragraph"></p><p>The post <a href="https://techieroop.com/sre-framework-gke-microservices-sli-slo-sla/">SRE Framework Guide for GKE Microservices (SLI, SLO & SLA)</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://techieroop.com/sre-framework-gke-microservices-sli-slo-sla/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1479</post-id>	</item>
		<item>
		<title>Networking Made Simple: From One Server to Kubernetes</title>
		<link>https://techieroop.com/networking-made-simple-from-one-server-to-kubernetes/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=networking-made-simple-from-one-server-to-kubernetes</link>
		
		<dc:creator><![CDATA[Roopendra]]></dc:creator>
		<pubDate>Sat, 29 Aug 2026 16:40:19 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Kubernetes]]></category>
		<guid isPermaLink="false">https://techieroop.com/?p=1475</guid>

					<description><![CDATA[<p>Networking can feel complicated because we hear words like IP, DNS, ports, subnets, routing, NAT, VPC, Docker, Kubernetes, Ingress — all at once. But the easiest way to understand networking is to follow one simple question: “How does a request find the right application, and how do we control who is allowed to reach it?”...</p>
<p>The post <a href="https://techieroop.com/networking-made-simple-from-one-server-to-kubernetes/">Networking Made Simple: From One Server to Kubernetes</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></description>
										<content:encoded><![CDATA[<p class="wp-block-paragraph">Networking can feel complicated because we hear words like <strong>IP, DNS, ports, subnets, routing, NAT, VPC, Docker, Kubernetes, Ingress</strong> — all at once.</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="1536" src="https://i0.wp.com/techieroop.com/wp-content/uploads/2026/08/ChatGPT-Image-Aug-29-2026-10_03_43-PM.png?fit=683%2C1024&amp;ssl=1" alt="" class="wp-image-1476" srcset="https://i0.wp.com/techieroop.com/wp-content/uploads/2026/08/ChatGPT-Image-Aug-29-2026-10_03_43-PM.png?w=1024&amp;ssl=1 1024w, https://i0.wp.com/techieroop.com/wp-content/uploads/2026/08/ChatGPT-Image-Aug-29-2026-10_03_43-PM.png?resize=200%2C300&amp;ssl=1 200w, https://i0.wp.com/techieroop.com/wp-content/uploads/2026/08/ChatGPT-Image-Aug-29-2026-10_03_43-PM.png?resize=683%2C1024&amp;ssl=1 683w, https://i0.wp.com/techieroop.com/wp-content/uploads/2026/08/ChatGPT-Image-Aug-29-2026-10_03_43-PM.png?resize=768%2C1152&amp;ssl=1 768w" sizes="auto, (max-width: 640px) 100vw, 640px" /></figure>



<p class="wp-block-paragraph">But the easiest way to understand networking is to follow one simple question:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>“How does a request find the right application, and how do we control who is allowed to reach it?”</strong></p>
</blockquote>



<p class="wp-block-paragraph">Let&#8217;s build the answer step by step.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">1. Finding the Server: IP Addresses &amp; DNS</h2>



<p class="wp-block-paragraph">Imagine you have deployed a web application on a server.</p>



<p class="wp-block-paragraph">Every server needs an <strong>IP address</strong> so other machines know where to find it.</p>



<p class="wp-block-paragraph">For example:</p>



<pre class="wp-block-preformatted"> <code>                Internet
                    │
                    │
              myapp.com
                    │
                    ▼
                  DNS
                    │
                    ▼
             203.0.113.42
                    │
                    ▼
              ┌───────────┐
              │   Server  │
              │ 203.0.113.42
              └───────────┘
</code></pre>



<p class="wp-block-paragraph">But nobody wants to remember:</p>



<p class="wp-block-paragraph"><code>203.0.113.42</code></p>



<p class="wp-block-paragraph">We prefer:</p>



<p class="wp-block-paragraph"><code>myapp.com</code></p>



<p class="wp-block-paragraph">That&#8217;s where <strong>DNS (Domain Name System)</strong> comes in.</p>



<p class="wp-block-paragraph">Think of DNS as the <strong>phonebook of the internet</strong>.</p>



<pre class="wp-block-code"><code>myapp.com
    │
    ▼
  DNS
    │
    ▼
203.0.113.42
</code></pre>



<p class="wp-block-paragraph"><strong>Simple takeaway:</strong></p>



<ul class="wp-block-list">
<li class=""><strong>IP = Where is the server?</strong></li>



<li class=""><strong>DNS = What name should I use to find it?</strong></li>
</ul>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">2. One Server, Multiple Apps: Ports</h2>



<p class="wp-block-paragraph">Now imagine the same server is running:</p>



<ul class="wp-block-list">
<li class="">Website</li>



<li class="">API</li>



<li class="">Database</li>
</ul>



<p class="wp-block-paragraph">They all have the same IP address.</p>



<p class="wp-block-paragraph">So how does the server know which application should receive the request?</p>



<p class="wp-block-paragraph"><strong>Ports.</strong></p>



<p class="wp-block-paragraph">Think of a server as an apartment building.</p>



<pre class="wp-block-preformatted"> <code>                Server
            203.0.113.42
                  │
       ┌──────────┼──────────┐
       │          │          │
     :443       :8080      :5432
       │          │          │
       ▼          ▼          ▼
    Website      API     Database
</code></pre>



<p class="wp-block-paragraph">For example:</p>



<pre class="wp-block-code"><code>203.0.113.42:443   → HTTPS
203.0.113.42:8080  → API
203.0.113.42:5432  → PostgreSQL
</code></pre>



<p class="wp-block-paragraph"><strong>Simple takeaway:</strong></p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>IP finds the machine. Port finds the application.</strong></p>
</blockquote>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">3. Organizing the Network: Subnets</h2>



<p class="wp-block-paragraph">As our application grows, putting everything in one network isn&#8217;t a great idea.</p>



<p class="wp-block-paragraph">We might have:</p>



<pre class="wp-block-preformatted"> <code>                Network
                    │
        ┌───────────┴───────────┐
        │                       │
   Public Subnet           Private Subnet
        │                       │
   ┌────┴────┐             ┌────┴────┐
   │ Web/App │             │ DB      │
   │ Servers │             │ Servers │
   └─────────┘             └─────────┘
</code></pre>



<p class="wp-block-paragraph">A <strong>subnet</strong> is simply a smaller section of a larger network.</p>



<p class="wp-block-paragraph">We can use different subnets for different purposes:</p>



<ul class="wp-block-list">
<li class="">Public subnet → Internet-facing systems</li>



<li class="">Private subnet → Application servers</li>



<li class="">More restricted subnet → Databases</li>
</ul>



<p class="wp-block-paragraph">This gives us better <strong>organization, isolation and security</strong>.</p>



<p class="wp-block-paragraph"><strong>Simple takeaway:</strong></p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>Subnets divide one large network into smaller logical networks.</strong></p>
</blockquote>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">4. Directing Traffic: Routing</h2>



<p class="wp-block-paragraph">Now we have multiple subnets.</p>



<p class="wp-block-paragraph">But how does traffic move from one subnet to another?</p>



<p class="wp-block-paragraph">That&#8217;s the job of <strong>routing</strong>.</p>



<p class="wp-block-paragraph">Think of a router as a <strong>GPS for network packets</strong>.</p>



<pre class="wp-block-preformatted"> <code>            Web Server
                 │
                 │
                 ▼
          ┌─────────────┐
          │   Router    │
          │ Route Table │
          └──────┬──────┘
                 │
                 ▼
          Private Subnet
                 │
                 ▼
             Database
</code></pre>



<p class="wp-block-paragraph">A route table basically answers:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>“If the destination is X, where should I send the packet?”</strong></p>
</blockquote>



<p class="wp-block-paragraph">For example:</p>



<pre class="wp-block-code"><code>Destination          Next Hop
-----------          --------
10.0.1.0/24    →     App Subnet
10.0.2.0/24    →     DB Subnet
0.0.0.0/0      →     Internet Gateway
</code></pre>



<p class="wp-block-paragraph"><strong>Simple takeaway:</strong></p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>Routing decides where the traffic should go.</strong></p>
</blockquote>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">5. Securing the Borders: Firewalls</h2>



<p class="wp-block-paragraph">Routing tells us <strong>where traffic can go</strong>.</p>



<p class="wp-block-paragraph">But we also need to decide:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>“Should this traffic be allowed?”</strong></p>
</blockquote>



<p class="wp-block-paragraph">That&#8217;s where <strong>firewalls</strong> come in.</p>



<p class="wp-block-paragraph">Think of a firewall as a security guard.</p>



<pre class="wp-block-code"><code>Internet
   │
   │  HTTPS :443
   ▼
┌──────────────┐
│   Firewall   │
│              │
│ Allow :443   │
│ Deny :5432   │
└───────┬──────┘
        │
        ▼
    Web Server
</code></pre>



<p class="wp-block-paragraph">For example:</p>



<pre class="wp-block-code"><code>Internet → Web Server :443     &#x2705; ALLOW

Internet → Database :5432      &#x274c; DENY

App Server → Database :5432    &#x2705; ALLOW
</code></pre>



<p class="wp-block-paragraph">This is an important distinction:</p>



<pre class="wp-block-code"><code>Routing  → Where should traffic go?
Firewall → Is that traffic allowed?
</code></pre>



<p class="wp-block-paragraph"><strong>Simple takeaway:</strong></p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>Routing provides the path. Firewall controls access to that path.</strong></p>
</blockquote>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">6. Private Servers Reaching Out: NAT</h2>



<p class="wp-block-paragraph">Now let&#8217;s make our database and backend servers private.</p>



<p class="wp-block-paragraph">They don&#8217;t need to be directly accessible from the internet.</p>



<p class="wp-block-paragraph">But they might still need to access the internet for things like:</p>



<ul class="wp-block-list">
<li class="">Downloading updates</li>



<li class="">Calling an external API</li>



<li class="">Pulling packages</li>
</ul>



<p class="wp-block-paragraph">So how can a private server reach the internet without having its own public IP?</p>



<p class="wp-block-paragraph">Enter <strong>NAT — Network Address Translation</strong>.</p>



<pre class="wp-block-code"><code>Private Network

10.0.1.10 ──┐
10.0.1.11 ──┤
10.0.1.12 ──┤
10.0.1.13 ──┘
             │
             ▼
        ┌──────────┐
        │    NAT   │
        │ Gateway  │
        └────┬─────┘
             │
       Public IP
      203.0.113.5
             │
             ▼
          Internet
</code></pre>



<p class="wp-block-paragraph">Multiple private servers can share <strong>one public IP</strong>.</p>



<p class="wp-block-paragraph">The NAT gateway keeps track of the connections and sends responses back to the correct private server.</p>



<p class="wp-block-paragraph">This is also the basic idea behind your home Wi-Fi router.</p>



<p class="wp-block-paragraph"><strong>Simple takeaway:</strong></p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>NAT lets private systems communicate with the internet without exposing their private IPs.</strong></p>
</blockquote>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h1 class="wp-block-heading">7. The Cloud Evolution: VPC</h1>



<p class="wp-block-paragraph">Now let&#8217;s move the same architecture to the cloud.</p>



<p class="wp-block-paragraph">AWS, Azure and GCP give us the ability to create our own logical network.</p>



<p class="wp-block-paragraph">This is commonly called a <strong>VPC — Virtual Private Cloud</strong>.</p>



<p class="wp-block-paragraph">Think of a VPC as:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>“My own private network inside the cloud.”</strong></p>
</blockquote>



<p class="wp-block-paragraph">A typical setup looks like this:</p>



<pre class="wp-block-preformatted"> <code>                   INTERNET
                        │
                        ▼
                ┌──────────────┐
                │ Load Balancer│
                └───────┬──────┘
                        │
                ┌───────▼───────┐
                │  Public Subnet│
                └───────┬───────┘
                        │
                ┌───────▼───────┐
                │ Private Subnet│
                │  App Servers  │
                └───────┬───────┘
                        │
                ┌───────▼───────┐
                │ Private Subnet│
                │   Database    │
                └───────────────┘
</code></pre>



<p class="wp-block-paragraph">Inside a VPC we typically have:</p>



<pre class="wp-block-code"><code>VPC
 │
 ├── Subnets
 │
 ├── Route Tables
 │
 ├── Internet Gateway
 │
 ├── NAT Gateway
 │
 └── Security Groups / NACLs
</code></pre>



<p class="wp-block-paragraph">The important thing is that <strong>cloud networking didn&#8217;t replace networking fundamentals</strong>.</p>



<p class="wp-block-paragraph">It simply gave us cloud-managed versions of the same concepts.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h1 class="wp-block-heading">8. Containers Change the Game: Docker Networking</h1>



<p class="wp-block-paragraph">Now let&#8217;s say we package our applications into Docker containers.</p>



<p class="wp-block-paragraph">Instead of running everything directly on the server:</p>



<pre class="wp-block-code"><code>Server
 ├── Web
 ├── API
 └── Database
</code></pre>



<p class="wp-block-paragraph">we might have:</p>



<pre class="wp-block-code"><code>Docker Host
 ├── Container: Web
 ├── Container: API
 └── Container: Database
</code></pre>



<p class="wp-block-paragraph">Docker creates virtual networks so these containers can communicate.</p>



<pre class="wp-block-preformatted"> <code>            Docker Host<br>        ┌─────────────────────┐<br>        │                     │<br>        │    Docker Network   │<br>        │                     │<br>        │  ┌─────┐   ┌─────┐  │<br>        │  │ Web │   │ API │  │<br>        │  └─────┘   └──┬──┘  │<br>        │               │     │<br>        │            ┌──▼───┐ │<br>        │            │  DB  │ │<br>        │            └──────┘ │<br>        └─────────────────────┘<br></code></pre>



<p class="wp-block-paragraph">And we can expose a container port to the host:</p>



<pre class="wp-block-code"><code>Host :8080
     │
     ▼
Container :80
     │
     ▼
    Web App
</code></pre>



<p class="wp-block-paragraph">For example:</p>



<pre class="wp-block-code"><code>docker run -p 8080:80 my-web-app
</code></pre>



<p class="wp-block-paragraph">Meaning:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>Host port 8080 → Container port 80</strong></p>
</blockquote>



<p class="wp-block-paragraph">Again, the same networking ideas are appearing at another layer.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h1 class="wp-block-heading">9. Kubernetes: Networking at Scale</h1>



<p class="wp-block-paragraph">Running a few containers is easy.</p>



<p class="wp-block-paragraph">Running hundreds of containers across many servers is a different story.</p>



<p class="wp-block-paragraph">That&#8217;s where <strong>Kubernetes</strong> comes in.</p>



<p class="wp-block-paragraph">Kubernetes introduces a few important networking concepts.</p>



<h3 class="wp-block-heading">Pods</h3>



<p class="wp-block-paragraph">A Pod gets its own IP address.</p>



<pre class="wp-block-code"><code>Kubernetes Cluster

 ┌───────────────────────────┐
 │                           │
 │  Pod 10.0.1.10            │
 │  ┌───────┐ ┌──────────┐   │
 │  │ App   │ │ Sidecar  │   │
 │  └───────┘ └──────────┘   │
 │                           │
 │  Pod 10.0.1.11            │
 │  ┌───────┐                │
 │  │ App   │                │
 │  └───────┘                │
 │                           │
 └───────────────────────────┘
</code></pre>



<p class="wp-block-paragraph">But Pods are temporary.</p>



<p class="wp-block-paragraph">A Pod can disappear and be recreated with a <strong>different IP</strong>.</p>



<p class="wp-block-paragraph">So we need something stable.</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h3 class="wp-block-heading">Services</h3>



<p class="wp-block-paragraph">A Kubernetes <strong>Service</strong> provides a stable endpoint in front of Pods.</p>



<pre class="wp-block-preformatted"> <code>                Client
                    │
                    ▼
             ┌────────────┐
             │  Service   │
             │ 10.96.0.10 │
             └─────┬──────┘
                   │
             ┌─────┼─────┐
             │     │     │
             ▼     ▼     ▼
           Pod   Pod   Pod
           :10   :11   :12
</code></pre>



<p class="wp-block-paragraph">The Pods can come and go.</p>



<p class="wp-block-paragraph">The Service remains stable.</p>



<p class="wp-block-paragraph"><strong>Simple takeaway:</strong></p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>Pods are temporary. Services provide stable access.</strong></p>
</blockquote>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h1 class="wp-block-heading">10. One Entry Point for Many Apps: Ingress</h1>



<p class="wp-block-paragraph">Finally, imagine we have many services:</p>



<pre class="wp-block-code"><code>myapp.com       → Frontend
api.myapp.com   → API
admin.myapp.com → Admin
</code></pre>



<p class="wp-block-paragraph">We don&#8217;t necessarily want a separate public entry point for every service.</p>



<p class="wp-block-paragraph">That&#8217;s where <strong>Ingress</strong> comes in.</p>



<pre class="wp-block-preformatted"> <code>                      Internet
                           │
                           ▼
                    ┌────────────┐
                    │  Ingress   │
                    └─────┬──────┘
                          │
             ┌────────────┼────────────┐
             │            │            │
             ▼            ▼            ▼
        Frontend        API         Admin
        Service       Service       Service
</code></pre>



<p class="wp-block-paragraph">Ingress acts like a <strong>reception desk</strong>.</p>



<p class="wp-block-paragraph">It looks at the request and decides where it should go.</p>



<pre class="wp-block-code"><code>api.myapp.com
      │
      ▼
   Ingress
      │
      ▼
 API Service
      │
      ▼
   API Pods
</code></pre>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h1 class="wp-block-heading">The Big Picture</h1>



<p class="wp-block-paragraph">And this is the part I find most useful.</p>



<p class="wp-block-paragraph">All these networking concepts are really solving the same few problems:</p>



<pre class="wp-block-preformatted"> <code>            NETWORKING
                  │
       ┌──────────┼──────────┐
       │          │          │
       ▼          ▼          ▼
   IDENTIFY    DIRECT      CONTROL
       │          │          │
       ▼          ▼          ▼
     IP/DNS    Routing     Firewall
       │
       ▼
     Ports
       │
       ▼
   Application
</code></pre>



<p class="wp-block-paragraph">As the infrastructure grows, the same ideas keep coming back:</p>



<pre class="wp-block-code"><code>Single Server
     │
     ▼
IP + DNS + Ports
     │
     ▼
Multiple Networks
     │
     ▼
Subnets + Routing + Firewalls
     │
     ▼
Private Infrastructure
     │
     ▼
NAT
     │
     ▼
Cloud
     │
     ▼
VPC + Subnets + Gateways
     │
     ▼
Containers
     │
     ▼
Docker Networking
     │
     ▼
Kubernetes
     │
     ▼
Pods + Services + Ingress
</code></pre>



<h2 class="wp-block-heading">The 5 Questions to Remember</h2>



<p class="wp-block-paragraph">When troubleshooting a networking problem, don&#8217;t start with the acronyms.</p>



<p class="wp-block-paragraph">Start with these questions:</p>



<p class="wp-block-paragraph"><strong>1. Where is the destination?</strong><br>→ IP / DNS</p>



<p class="wp-block-paragraph"><strong>2. Which application should receive the traffic?</strong><br>→ Port</p>



<p class="wp-block-paragraph"><strong>3. How does the packet get there?</strong><br>→ Routing</p>



<p class="wp-block-paragraph"><strong>4. Is the traffic allowed?</strong><br>→ Firewall / Security Group</p>



<p class="wp-block-paragraph"><strong>5. Is the destination public or private?</strong><br>→ NAT / Gateway / Network design</p>



<p class="wp-block-paragraph">Once these become second nature, Docker, Kubernetes and cloud networking become much easier to understand.</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph"><strong>The tools change. The networking fundamentals don&#8217;t.</strong></p>
</blockquote>



<p class="wp-block-paragraph">That&#8217;s probably the most important lesson from this entire topic.</p><p>The post <a href="https://techieroop.com/networking-made-simple-from-one-server-to-kubernetes/">Networking Made Simple: From One Server to Kubernetes</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1475</post-id>	</item>
		<item>
		<title>Does sensitive = true Fully Protect Your Data in Terraform?</title>
		<link>https://techieroop.com/does-sensitive-true-fully-protect-your-data-in-terraform/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=does-sensitive-true-fully-protect-your-data-in-terraform</link>
		
		<dc:creator><![CDATA[Roopendra]]></dc:creator>
		<pubDate>Wed, 27 May 2026 04:57:41 +0000</pubDate>
				<category><![CDATA[Terraform]]></category>
		<guid isPermaLink="false">https://techieroop.com/does-sensitive-true-fully-protect-your-data-in-terraform/</guid>

					<description><![CDATA[<p>Does sensitive = true Fully Protect Your Data in Terraform? Marking a Terraform variable or output as sensitive = true is a useful safety measure, but it is widely misunderstood. It does not provide complete protection for your secrets. Here is exactly what it does and does not do. What sensitive = true Does variable...</p>
<p>The post <a href="https://techieroop.com/does-sensitive-true-fully-protect-your-data-in-terraform/">Does sensitive = true Fully Protect Your Data in Terraform?</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></description>
										<content:encoded><![CDATA[<h2>Does sensitive = true Fully Protect Your Data in Terraform?</h2>
<p>Marking a Terraform variable or output as <code>sensitive = true</code> is a useful safety measure, but it is widely misunderstood. It does <strong>not</strong> provide complete protection for your secrets. Here is exactly what it does and does not do.</p>
<h3>What sensitive = true Does</h3>
<pre><code>variable "db_password" {
  type      = string
  sensitive = true
}

output "db_connection_string" {
  value     = "postgres://admin:${var.db_password}@${aws_db_instance.main.endpoint}/app"
  sensitive = true
}
</code></pre>
<p>When marked sensitive, Terraform will:</p>
<ul>
<li>Mask the value in <code>terraform plan</code> and <code>terraform apply</code> output as <code>(sensitive value)</code>.</li>
<li>Suppress the value in <code>terraform output</code> unless you use <code>-json</code> or <code>-raw</code>.</li>
<li>Prevent the value from appearing in regular log output.</li>
</ul>
<pre><code># Plan output with sensitive = true
+ password = (sensitive value)   # Value is hidden in terminal
</code></pre>
<h3>What sensitive = true Does NOT Do</h3>
<p>This is the critical part most engineers miss:</p>
<ul>
<li>It does <strong>NOT</strong> encrypt the value in the state file.</li>
<li>It does <strong>NOT</strong> prevent the value from being read with <code>terraform state pull</code>.</li>
<li>It does <strong>NOT</strong> remove the value from the <code>.tfstate</code> file on disk.</li>
</ul>
<pre><code># The password is stored in CLEARTEXT inside terraform.tfstate
{
  "resources": [
    {
      "instances": [
        {
          "attributes": {
            "password": "SuperSecretPassword123!"  # Fully visible in state file!
          }
        }
      ]
    }
  ]
}
</code></pre>
<h3>How to Truly Secure Sensitive Data</h3>
<p><strong>1. Use a Remote Backend with Encryption at Rest</strong></p>
<pre><code>terraform {
  backend "s3" {
    bucket         = "my-terraform-state"
    key            = "prod/terraform.tfstate"
    region         = "us-east-1"
    encrypt        = true          # Server-side encryption
    kms_key_id     = "arn:aws:kms:us-east-1:123456789:key/abc-123"  # KMS key
    dynamodb_table = "terraform-lock"
  }
}
</code></pre>
<p><strong>2. Restrict Access to the State File</strong></p>
<pre><code># S3 bucket policy — restrict to only Terraform IAM role
{
  "Effect": "Deny",
  "Principal": "*",
  "Action": "s3:GetObject",
  "Resource": "arn:aws:s3:::my-terraform-state/*",
  "Condition": {
    "StringNotEquals": {
      "aws:PrincipalArn": "arn:aws:iam::123456789:role/terraform-role"
    }
  }
}
</code></pre>
<p><strong>3. Avoid Storing Secrets in State at All</strong></p>
<pre><code># Use a data source to fetch secrets at apply time instead of storing them
data "aws_secretsmanager_secret_version" "db_pass" {
  secret_id = "prod/db/password"
}
</code></pre>
<h3>Key Takeaway</h3>
<p><code>sensitive = true</code> only masks values in CLI output and logs — it is a display-layer protection, not encryption. The secret is still stored as cleartext in your state file. For true security, use a remote backend with KMS encryption, restrict state file access via IAM policies, and source secrets from a secret manager at apply time.</p><p>The post <a href="https://techieroop.com/does-sensitive-true-fully-protect-your-data-in-terraform/">Does sensitive = true Fully Protect Your Data in Terraform?</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1474</post-id>	</item>
		<item>
		<title>How to Migrate Terraform State from Local to a Remote Backend</title>
		<link>https://techieroop.com/how-to-migrate-terraform-state-from-local-to-a-remote-backend/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-migrate-terraform-state-from-local-to-a-remote-backend</link>
		
		<dc:creator><![CDATA[Roopendra]]></dc:creator>
		<pubDate>Wed, 27 May 2026 04:57:40 +0000</pubDate>
				<category><![CDATA[Terraform]]></category>
		<guid isPermaLink="false">https://techieroop.com/how-to-migrate-terraform-state-from-local-to-a-remote-backend/</guid>

					<description><![CDATA[<p>How to Migrate Terraform State from Local to a Remote Backend When you first start with Terraform, state is stored locally in terraform.tfstate. As your team grows, you need to migrate to a remote backend for collaboration, security, and state locking. Why Migrate to a Remote Backend? Enables team collaboration — everyone shares the same...</p>
<p>The post <a href="https://techieroop.com/how-to-migrate-terraform-state-from-local-to-a-remote-backend/">How to Migrate Terraform State from Local to a Remote Backend</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></description>
										<content:encoded><![CDATA[<h2>How to Migrate Terraform State from Local to a Remote Backend</h2>
<p>When you first start with Terraform, state is stored locally in <code>terraform.tfstate</code>. As your team grows, you need to migrate to a remote backend for collaboration, security, and state locking.</p>
<h3>Why Migrate to a Remote Backend?</h3>
<ul>
<li>Enables team collaboration — everyone shares the same state.</li>
<li>Prevents concurrent apply conflicts with state locking.</li>
<li>Keeps secrets out of your local machine and version control.</li>
<li>Enables versioning, encryption at rest, and audit logs.</li>
</ul>
<h3>Step 1: Create the Remote Backend Infrastructure</h3>
<p>First, provision the S3 bucket and DynamoDB table for state storage and locking:</p>
<pre><code># Create S3 bucket (do this manually or with a separate Terraform config)
aws s3api create-bucket \
  --bucket my-terraform-state \
  --region us-east-1

# Enable versioning
aws s3api put-bucket-versioning \
  --bucket my-terraform-state \
  --versioning-configuration Status=Enabled

# Create DynamoDB table for state locking
aws dynamodb create-table \
  --table-name terraform-state-lock \
  --attribute-definitions AttributeName=LockID,AttributeType=S \
  --key-schema AttributeName=LockID,KeyType=HASH \
  --billing-mode PAY_PER_REQUEST
</code></pre>
<h3>Step 2: Add the Backend Block to Your Config</h3>
<pre><code>terraform {
  backend "s3" {
    bucket         = "my-terraform-state"
    key            = "prod/terraform.tfstate"
    region         = "us-east-1"
    encrypt        = true
    dynamodb_table = "terraform-state-lock"
  }
}
</code></pre>
<h3>Step 3: Run terraform init to Trigger Migration</h3>
<pre><code>terraform init
</code></pre>
<p>Terraform detects that the backend has changed and prompts:</p>
<pre><code>Do you want to copy existing state to the new backend?
  Pre-existing state was found while migrating the previous backend.
  Enter "yes" to copy this state to the new backend.

Enter a value: yes
</code></pre>
<p>Type <code>yes</code> and Terraform automatically copies your local state to the remote backend.</p>
<h3>Step 4: Verify the Migration</h3>
<pre><code># Confirm remote state is accessible
terraform state list

# Check the remote state file in S3
aws s3 ls s3://my-terraform-state/prod/
</code></pre>
<h3>Step 5: Clean Up Local State</h3>
<p>After verifying the migration was successful, remove the local state file:</p>
<pre><code># Keep a backup first
cp terraform.tfstate terraform.tfstate.backup

# Remove local state (remote is now the source of truth)
rm terraform.tfstate
rm terraform.tfstate.backup
</code></pre>
<h3>Key Takeaway</h3>
<p>Migrating to a remote backend is a three-step process: add the backend block, run <code>terraform init</code>, and confirm the migration prompt. Always verify state integrity afterward and enable versioning on your S3 bucket before migrating.</p><p>The post <a href="https://techieroop.com/how-to-migrate-terraform-state-from-local-to-a-remote-backend/">How to Migrate Terraform State from Local to a Remote Backend</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1473</post-id>	</item>
		<item>
		<title>Terraform create_before_destroy Lifecycle Rule Explained</title>
		<link>https://techieroop.com/terraform-create_before_destroy-lifecycle-rule-explained/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=terraform-create_before_destroy-lifecycle-rule-explained</link>
		
		<dc:creator><![CDATA[Roopendra]]></dc:creator>
		<pubDate>Wed, 27 May 2026 04:57:40 +0000</pubDate>
				<category><![CDATA[Terraform]]></category>
		<guid isPermaLink="false">https://techieroop.com/terraform-create_before_destroy-lifecycle-rule-explained/</guid>

					<description><![CDATA[<p>Terraform create_before_destroy Lifecycle Rule Explained When Terraform needs to replace a resource (destroy and recreate), it follows a specific order. Understanding the create_before_destroy lifecycle rule helps you avoid downtime during infrastructure updates. Default Behavior: Destroy Then Create By default, when a resource needs to be replaced, Terraform: Destroys the old resource. Creates the new resource....</p>
<p>The post <a href="https://techieroop.com/terraform-create_before_destroy-lifecycle-rule-explained/">Terraform create_before_destroy Lifecycle Rule Explained</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></description>
										<content:encoded><![CDATA[<h2>Terraform create_before_destroy Lifecycle Rule Explained</h2>
<p>When Terraform needs to replace a resource (destroy and recreate), it follows a specific order. Understanding the <code>create_before_destroy</code> lifecycle rule helps you avoid downtime during infrastructure updates.</p>
<h3>Default Behavior: Destroy Then Create</h3>
<p>By default, when a resource needs to be replaced, Terraform:</p>
<ol>
<li>Destroys the old resource.</li>
<li>Creates the new resource.</li>
</ol>
<p>This causes a window of downtime where neither the old nor new resource exists.</p>
<h3>create_before_destroy: Create Then Destroy</h3>
<p>With <code>create_before_destroy = true</code>, Terraform reverses the order:</p>
<ol>
<li>Creates the new resource first.</li>
<li>Waits for it to be fully operational.</li>
<li>Destroys the old resource.</li>
</ol>
<pre><code>resource "aws_instance" "web" {
  ami           = var.ami_id
  instance_type = "t3.micro"

  lifecycle {
    create_before_destroy = true
  }
}
</code></pre>
<h3>Real-World Example: Auto Scaling Launch Template</h3>
<pre><code>resource "aws_launch_template" "app" {
  name_prefix   = "app-"
  image_id      = var.ami_id
  instance_type = "t3.micro"

  lifecycle {
    create_before_destroy = true
  }
}

resource "aws_autoscaling_group" "app" {
  launch_template {
    id      = aws_launch_template.app.id
    version = "$Latest"
  }
  min_size         = 2
  max_size         = 5
  desired_capacity = 2
}
</code></pre>
<p>When the AMI is updated, a new launch template is created before the old one is removed, ensuring the ASG always has a valid template.</p>
<h3>Example: TLS Certificate Rotation</h3>
<pre><code>resource "aws_acm_certificate" "cert" {
  domain_name       = "example.com"
  validation_method = "DNS"

  lifecycle {
    create_before_destroy = true
  }
}
</code></pre>
<p>The new certificate is issued and validated before the old one is deleted, preventing HTTPS downtime.</p>
<h3>Other Useful Lifecycle Rules</h3>
<pre><code>lifecycle {
  create_before_destroy = true   # Create new before destroying old
  prevent_destroy       = true   # Block any destroy operation (great for databases)
  ignore_changes        = [tags] # Ignore drift in specific attributes
}
</code></pre>
<h3>Key Takeaway</h3>
<p>Always use <code>create_before_destroy = true</code> for production resources where availability matters — load balancers, certificates, launch templates, and DNS records. Pair it with <code>prevent_destroy = true</code> on critical resources like databases to add an extra safety net.</p><p>The post <a href="https://techieroop.com/terraform-create_before_destroy-lifecycle-rule-explained/">Terraform create_before_destroy Lifecycle Rule Explained</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1472</post-id>	</item>
		<item>
		<title>What is the Purpose of a null_resource in Terraform?</title>
		<link>https://techieroop.com/what-is-the-purpose-of-a-null_resource-in-terraform/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=what-is-the-purpose-of-a-null_resource-in-terraform</link>
		
		<dc:creator><![CDATA[Roopendra]]></dc:creator>
		<pubDate>Wed, 27 May 2026 04:57:39 +0000</pubDate>
				<category><![CDATA[Terraform]]></category>
		<guid isPermaLink="false">https://techieroop.com/what-is-the-purpose-of-a-null_resource-in-terraform/</guid>

					<description><![CDATA[<p>What is the Purpose of a null_resource in Terraform? A null_resource is a special Terraform resource that does not manage any real cloud infrastructure. Instead, it acts as a placeholder to trigger side effects — like running scripts or commands — at the right point in the Terraform lifecycle. When to Use null_resource Use it...</p>
<p>The post <a href="https://techieroop.com/what-is-the-purpose-of-a-null_resource-in-terraform/">What is the Purpose of a null_resource in Terraform?</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></description>
										<content:encoded><![CDATA[<h2>What is the Purpose of a null_resource in Terraform?</h2>
<p>A <code>null_resource</code> is a special Terraform resource that does not manage any real cloud infrastructure. Instead, it acts as a placeholder to trigger side effects — like running scripts or commands — at the right point in the Terraform lifecycle.</p>
<h3>When to Use null_resource</h3>
<p>Use it when you need to:</p>
<ul>
<li>Run a local or remote script after certain infrastructure is ready.</li>
<li>Execute a command that does not map to a Terraform resource.</li>
<li>Trigger actions based on changes to other resources.</li>
</ul>
<h3>Basic Example: Run a Local Script</h3>
<pre><code>resource "null_resource" "run_setup_script" {
  provisioner "local-exec" {
    command = "bash ./scripts/setup.sh"
  }

  depends_on = [aws_instance.web]
}
</code></pre>
<p>This runs <code>setup.sh</code> on your local machine after the EC2 instance is created.</p>
<h3>Using triggers to Re-run on Change</h3>
<p>By default, a <code>null_resource</code> only runs once. Use <code>triggers</code> to re-execute it when a value changes:</p>
<pre><code>resource "null_resource" "redeploy_app" {
  triggers = {
    app_version = var.app_version
    instance_id = aws_instance.web.id
  }

  provisioner "local-exec" {
    command = "ansible-playbook -i '${aws_instance.web.public_ip},' deploy.yml"
  }
}
</code></pre>
<p>Every time <code>app_version</code> or the instance ID changes, this resource will be destroyed and recreated, triggering the provisioner again.</p>
<h3>Remote Execution with remote-exec</h3>
<pre><code>resource "null_resource" "configure_server" {
  connection {
    type        = "ssh"
    user        = "ubuntu"
    private_key = file("~/.ssh/id_rsa")
    host        = aws_instance.web.public_ip
  }

  provisioner "remote-exec" {
    inline = [
      "sudo apt-get update -y",
      "sudo apt-get install -y nginx",
      "sudo systemctl start nginx"
    ]
  }

  depends_on = [aws_instance.web]
}
</code></pre>
<h3>Modern Alternative: terraform_data (Terraform 1.4+)</h3>
<pre><code># null_resource is being replaced by terraform_data in newer versions
resource "terraform_data" "run_script" {
  triggers_replace = [var.app_version]

  provisioner "local-exec" {
    command = "echo Deploying version ${var.app_version}"
  }
}
</code></pre>
<h3>Key Takeaway</h3>
<p><code>null_resource</code> is your escape hatch for actions Terraform cannot model as a resource. Use it sparingly with provisioners for bootstrapping or triggering scripts. For Terraform 1.4 and above, prefer the built-in <code>terraform_data</code> resource instead.</p><p>The post <a href="https://techieroop.com/what-is-the-purpose-of-a-null_resource-in-terraform/">What is the Purpose of a null_resource in Terraform?</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1471</post-id>	</item>
		<item>
		<title>How to Handle Secrets in Terraform Without Hardcoding Them</title>
		<link>https://techieroop.com/how-to-handle-secrets-in-terraform-without-hardcoding-them/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-handle-secrets-in-terraform-without-hardcoding-them</link>
		
		<dc:creator><![CDATA[Roopendra]]></dc:creator>
		<pubDate>Wed, 27 May 2026 04:57:38 +0000</pubDate>
				<category><![CDATA[Terraform]]></category>
		<guid isPermaLink="false">https://techieroop.com/how-to-handle-secrets-in-terraform-without-hardcoding-them/</guid>

					<description><![CDATA[<p>How to Handle Secrets in Terraform Without Hardcoding Them Hardcoding secrets like passwords, API keys, or tokens directly in .tf files is a critical security mistake. This guide covers the right ways to manage secrets in Terraform. What NOT to Do # NEVER do this — secrets committed to version control resource "aws_db_instance" "main" {...</p>
<p>The post <a href="https://techieroop.com/how-to-handle-secrets-in-terraform-without-hardcoding-them/">How to Handle Secrets in Terraform Without Hardcoding Them</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></description>
										<content:encoded><![CDATA[<h2>How to Handle Secrets in Terraform Without Hardcoding Them</h2>
<p>Hardcoding secrets like passwords, API keys, or tokens directly in <code>.tf</code> files is a critical security mistake. This guide covers the right ways to manage secrets in Terraform.</p>
<h3>What NOT to Do</h3>
<pre><code># NEVER do this — secrets committed to version control
resource "aws_db_instance" "main" {
  username = "admin"
  password = "SuperSecretPassword123!"  # BAD
}
</code></pre>
<h3>Option 1: Environment Variables with TF_VAR_</h3>
<p>Terraform reads environment variables prefixed with <code>TF_VAR_</code> and maps them to input variables.</p>
<pre><code># In your shell or CI/CD pipeline
export TF_VAR_db_password="SuperSecretPassword123!"

# In variables.tf
variable "db_password" {
  type      = string
  sensitive = true
}

# In main.tf
resource "aws_db_instance" "main" {
  username = "admin"
  password = var.db_password
}
</code></pre>
<h3>Option 2: Mark Variables as sensitive</h3>
<pre><code>variable "api_key" {
  type      = string
  sensitive = true  # Masks value in CLI output and logs
}
</code></pre>
<p>Note: This masks the value in terminal output but does NOT encrypt it in the state file.</p>
<h3>Option 3: HashiCorp Vault (Most Secure)</h3>
<pre><code>provider "vault" {
  address = "https://vault.mycompany.com"
}

data "vault_generic_secret" "db_creds" {
  path = "secret/database/prod"
}

resource "aws_db_instance" "main" {
  username = data.vault_generic_secret.db_creds.data["username"]
  password = data.vault_generic_secret.db_creds.data["password"]
}
</code></pre>
<h3>Option 4: AWS Secrets Manager</h3>
<pre><code>data "aws_secretsmanager_secret_version" "db_pass" {
  secret_id = "prod/app/db_password"
}

resource "aws_db_instance" "main" {
  password = data.aws_secretsmanager_secret_version.db_pass.secret_string
}
</code></pre>
<h3>Option 5: .tfvars Files (Keep Out of Git)</h3>
<pre><code># terraform.tfvars — ADD THIS TO .gitignore
db_password = "SuperSecretPassword123!"
</code></pre>
<pre><code># .gitignore
*.tfvars
*.tfvars.json
</code></pre>
<h3>Key Takeaway</h3>
<p>Never store secrets in <code>.tf</code> files or commit them to version control. Use <code>TF_VAR_</code> environment variables for simple cases, and HashiCorp Vault or cloud-native secret managers (AWS Secrets Manager, Azure Key Vault) for production workloads.</p><p>The post <a href="https://techieroop.com/how-to-handle-secrets-in-terraform-without-hardcoding-them/">How to Handle Secrets in Terraform Without Hardcoding Them</a> first appeared on <a href="https://techieroop.com">TechieRoop</a>.</p>]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">1470</post-id>	</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Object Caching 20/271 objects using Disk
Page Caching using Disk: Enhanced (Page is feed) 
Lazy Loading (feed)
Minified using Disk
Database Caching using Disk (Request-wide modification query)

Served from: techieroop.com @ 2026-09-27 20:51:41 by W3 Total Cache
-->