<?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/" >

<channel><title><![CDATA[AZURE HEROES - Blog]]></title><link><![CDATA[https://www.azure-heros.com/blog]]></link><description><![CDATA[Blog]]></description><pubDate>Sun, 01 Mar 2026 05:39:15 +0300</pubDate><generator>Weebly</generator><item><title><![CDATA[Azure Virtual Network Routing Appliance — A Native Solution for Hub-and-Spoke Routing]]></title><link><![CDATA[https://www.azure-heros.com/blog/azure-virtual-network-routing-appliance-a-native-solution-for-hub-and-spoke-routing]]></link><comments><![CDATA[https://www.azure-heros.com/blog/azure-virtual-network-routing-appliance-a-native-solution-for-hub-and-spoke-routing#comments]]></comments><pubDate>Sat, 14 Feb 2026 21:00:00 GMT</pubDate><category><![CDATA[Uncategorized]]></category><guid isPermaLink="false">https://www.azure-heros.com/blog/azure-virtual-network-routing-appliance-a-native-solution-for-hub-and-spoke-routing</guid><description><![CDATA[A few months back, a customer called me with a familiar frustration. They had a solid hub-and-spoke topology in Azure — around 100 spoke VNets, one per application team, clean isolation, good governance. Textbook setup. The problem? Traffic between their spokes had to pass through an Azure Firewall Premium they'd deployed in the hub, and they were starting to hit the 100 Gbps ceiling. On top of that, their monthly Azure Firewall bill had grown to a point where the finance team was asking quest [...] ]]></description><content:encoded><![CDATA[<div class="paragraph"><font color="#2A2A2A">A few months back, a customer called me with a familiar frustration. They had a solid hub-and-spoke topology in Azure &mdash; around 100 spoke VNets, one per application team, clean isolation, good governance. Textbook setup. The problem? Traffic between their spokes had to pass through an Azure Firewall Premium they'd deployed in the hub, and they were starting to hit the 100 Gbps ceiling. On top of that, their monthly Azure Firewall bill had grown to a point where the finance team was asking questions &mdash; and the honest answer was: *"We're mostly using it as a router, not a firewall.</font><br></div><div><div class="wsite-image wsite-image-border-none" style="padding-top:10px;padding-bottom:10px;margin-left:0;margin-right:0;text-align:center"><a><img src="https://www.azure-heros.com/uploads/8/5/6/6/8566957/virtual-network-appliance-diagram_orig.png" alt="Picture" style="width:auto;max-width:100%"></a><div style="display:block;font-size:90%"></div></div></div><div><!--BLOG_SUMMARY_END--></div><div class="paragraph"><font color="#2A2A2A">That's an awkward conversation.<br><br>They didn't need deep packet inspection between internal spokes. They didn't need L7 filtering. They just needed traffic from Spoke A to reach Spoke B reliably and fast at scale. We looked at third-party NVAs, but the licensing costs, the VM-based throughput caps, and the 250,000 active connection limit made that feel like trading one problem for another.</font><br><br>Then Microsoft released<span>&nbsp;</span><strong>Azure Virtual Network Routing Appliance</strong><span>&nbsp;</span>into public preview in February 2026, and things got interesting.</div><div><div id="600769528200071820" align="left" style="width: 100%; overflow-y: hidden;" class="wcustomhtml"><article><h2>Why Spoke-to-Spoke Routing Is a Pain in the First Place</h2><p>If you've worked with Azure long enough, you know that VNet peering is not transitive. Spoke A and Spoke B are both peered to the Hub, but they can't talk to each other through the hub unless you explicitly tell them how.</p><p>This trips up a lot of engineers coming from traditional networking. On-premises, your router just&hellip; routes. In Azure, the "default gateway" of a subnet doesn't really exist as a routing entity. The virtual NIC itself holds the routing table and sends traffic directly to the destination &mdash; bypassing any gateway in between. So if you want Spoke A to reach Spoke B via the hub, you need an actual device sitting in the hub that Azure can use as a next-hop.</p><p>Historically, your options were:</p><table><thead><tr><th>Option</th><th>The Catch</th></tr></thead><tbody><tr><td><strong>Azure Firewall Premium</strong></td><td>Great firewall, awkward router. Max 100 Gbps, $1.75/hr before data charges, limited BGP support for learning on-prem default routes.</td></tr><tr><td><strong>Azure Firewall Standard</strong></td><td>Max 30 Gbps, $1.25/hr &mdash; even less suited for high-throughput routing.</td></tr><tr><td><strong>Third-party NVA</strong></td><td>VM-based = VM limits. The 250,000 active connection cap has caught more than a few people off guard at scale. Add licensing, patching, and support contracts on top.</td></tr></tbody></table><p>For organizations going cloud-first, there's often a genuine push to avoid third-party NVAs where a native Azure construct can do the job. Until now, there wasn't one.</p><hr><h2>Enter the Azure Virtual Network Routing Appliance</h2><p>AVNA is a managed Azure resource that you deploy directly inside your hub VNet. It runs on <strong>specialized networking hardware</strong> &mdash; not regular VMs &mdash; which is exactly why the performance numbers look so different from what you're used to.</p><p>Here's what makes it different from an NVA or Azure Firewall:</p><ul><li>It's a <strong>top-level Azure resource</strong> &mdash; managed just like a VNet, NSG, or Route Table. No OS to patch, no images to manage.</li><li>It lives in a <strong>dedicated subnet</strong> called <code>VirtualNetworkApplianceSubnet</code>.</li><li>It's <strong>purely a forwarding layer</strong> &mdash; it routes traffic, full stop. No firewall policy, no DPI, no NAT (though it works alongside NAT Gateway).</li><li><strong>High availability is built-in</strong> and it's availability zone resilient by default &mdash; you don't need a load balancer in front of it. If you put one there anyway, it won't work the way you expect.</li><li>Supports <strong>NSGs, Admin rules, UDRs, and NAT Gateway</strong> natively.</li></ul><hr><h2>The Architecture</h2><p>Here's how this looks in a typical hub-and-spoke setup. Each spoke VNet is peered to the hub. You configure UDRs in your spoke subnets to point east-west traffic at the AVNA's IP address as the next-hop. The AVNA handles the rest &mdash; forwarding the packet to the right destination spoke. On-premises traffic keeps going through your hub VPN/ExpressRoute gateway, and internet egress still goes through your NAT Gateway or firewall.</p></article></div></div><div><div class="wsite-image wsite-image-border-none" style="padding-top:10px;padding-bottom:10px;margin-left:0;margin-right:0;text-align:center"><a><img src="https://www.azure-heros.com/uploads/8/5/6/6/8566957/imagensg4_orig.png" alt="Picture" style="width:auto;max-width:100%"></a><div style="display:block;font-size:90%"></div></div></div><div><div id="389754780844848882" align="left" style="width: 100%; overflow-y: hidden;" class="wcustomhtml">Click to set custom HTML</div></div><div><div id="193008405506446380" align="left" style="width: 100%; overflow-y: hidden;" class="wcustomhtml"><p class="diagram-caption">Fig 1 &mdash; Hub-and-spoke topology with AVNA as the east-west routing layer</p><hr><h2>How You Set Up the Routing</h2><p>This is where it gets a bit architectural. Once AVNA is deployed, you need to decide how your spoke UDRs are structured. Three options:</p><div class="options-grid"><div class="option-card"><div class="label">Option 1 &mdash; Keep it granular</div><p>Create specific routes per spoke &mdash; cloud prefixes go to AVNA, on-premises traffic to the hub gateway, internet to egress. Maximum control, maximum route table management. Fine for small environments, painful at scale.</p></div><div class="option-card"><div class="label">Option 2 &mdash; Everything through AVNA</div><p>Point a default route (0.0.0.0/0) in the spokes to the AVNA and let it sort everything &mdash; spoke-to-spoke internally, on-prem to the gateway, internet egress onward. Simplest UDR config. Reduces asymmetric routing risk. Trade-off: you lose per-spoke granularity.</p></div><div class="option-card recommended"><div class="label">&#9989; Option 3 &mdash; RFC1918 via AVNA, default to egress (the sweet spot)</div><p>Send all private address space (10/8, 172.16/12, 192.168/16) to the AVNA. Let the default route (0.0.0.0/0) point to your internet egress solution. Cleanly separates spoke-to-spoke routing from internet egress, reduces accidental asymmetric firewall paths, and keeps spoke UDRs simple. Most practitioners land here.</p></div></div><hr><h2>Performance &mdash; This Is Where It Gets Serious</h2></div></div><div><div class="wsite-image wsite-image-border-none" style="padding-top:10px;padding-bottom:10px;margin-left:0;margin-right:0;text-align:center"><a><img src="https://www.azure-heros.com/uploads/8/5/6/6/8566957/imagensgee4_orig.png" alt="Picture" style="width:auto;max-width:100%"></a><div style="display:block;font-size:90%"></div></div></div><div><div id="462504448881156895" align="left" style="width: 100%; overflow-y: hidden;" class="wcustomhtml"><p class="diagram-caption">Fig 2 &mdash; AVNA bandwidth tiers and their capacity limits</p><p>Compare 200 Gbps and 8 million concurrent flows to what Azure Firewall Premium offers (100 Gbps) or what a typical NVA VM can do &mdash; limited by the VM SKU and that 250,000 connection cap. For high-traffic, east-west-heavy environments, this changes the conversation completely.</p><div class="callout"><strong>&#9888;&#65039; Heads-up:</strong> The capacity tier is selected at deployment time and <strong>cannot be changed later</strong> without a full redeployment. Size it properly upfront. During preview there's no charge, so you might as well pick 200 Gbps &mdash; but when billing kicks in at GA, you'll want to have done that math first.</div><hr><h2>What About NSGs?</h2><p>You can attach an NSG to the <code>VirtualNetworkApplianceSubnet</code> to enforce basic Layer 4 filtering between spokes. But be aware &mdash; because traffic is both entering and leaving through the same subnet, your rules need to handle both inbound and outbound directions. NSGs are a blunt tool here, and this setup is really suited to spokes in the <strong>same security zone</strong> where you just need some least-privilege access control. If you need stateful deep filtering, Azure Firewall or a third-party NVA is still the right answer for that layer.</p><hr><h2>Preview Limitations &mdash; Be Honest With Your Stakeholders</h2><table><thead><tr><th>What's limited</th><th>Details</th></tr></thead><tbody><tr><td><strong>Not production-ready</strong></td><td>Preview only &mdash; for testing and evaluation</td></tr><tr><td><strong>Instances per subscription</strong></td><td>Max 2 (request more via form)</td></tr><tr><td><strong>Max throughput</strong></td><td>200 Gbps per instance</td></tr><tr><td><strong>IPv6</strong></td><td>Not supported</td></tr><tr><td><strong>Metrics and logs</strong></td><td>Not yet exposed &mdash; you're flying blind during preview</td></tr><tr><td><strong>Tooling</strong></td><td>No Azure CLI, PowerShell, or Terraform support yet</td></tr><tr><td><strong>Private Endpoint</strong></td><td>Global and cross-region Private Endpoint not supported</td></tr><tr><td><strong>Regions</strong></td><td>East US, East US 2, West Central US, West US, North Europe, UK South, West Europe, East Asia</td></tr><tr><td><strong>Cost</strong></td><td>Free during preview</td></tr></tbody></table><p>The lack of metrics is the one that stings the most in practice. You can't see traffic volumes, connection counts, or error rates. That's fine for a lab, not great if you're trying to build confidence for a GA migration plan.</p><hr><h2>How to Get Access</h2><ol><li>Register your subscription for the preview feature flag: <code>Microsoft.network/AllowVirtualNetworkAppliance</code></li><li>Fill out the sign-up form linked on the <a href="https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-routing-appliance-overview" target="_blank" rel="noopener noreferrer">Microsoft Learn page</a></li><li>Wait for product group approval</li></ol><p>It's technically a public preview, but the approval gate and limited region availability make it feel closer to a private preview. Expect some wait time.</p><hr><h2>My Take</h2><p>Going back to my customer &mdash; we're watching this closely. The numbers look right, the architecture fits, and the idea of removing a $1.75/hr firewall that was doing routing work and replacing it with a native Azure construct is exactly the kind of simplification their platform team has been pushing for.</p><p>What I'd want to see before recommending this for production:</p><ul><li><strong>Metrics and logging</strong> &mdash; you need visibility into what's flowing through it</li><li><strong>Terraform and CLI support</strong> &mdash; nobody wants to manage infrastructure only through the portal</li><li><strong>Clear GA pricing</strong> &mdash; the capacity tiers strongly suggest tiered billing; that math needs to make sense vs. alternatives</li><li><strong>IPv6 support</strong> &mdash; more and more environments are running dual-stack</li></ul><p>If you're in a hub-and-spoke topology and your routing solution feels like a workaround, this is worth signing up for and testing. Get familiar with it now so you're ready when it hits GA.</p><div class="sources"><strong>Sources:</strong><br><a href="https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-routing-appliance-overview" target="_blank" rel="noopener noreferrer">Microsoft Learn &mdash; Virtual Network Routing Appliance Overview</a><br><a href="https://www.simonpainter.com/azure-virtual-network-appliance/" target="_blank" rel="noopener noreferrer">Simon Painter (Azure MVP) &mdash; Public preview of Azure Virtual Network Routing Appliance</a></div></div></div>]]></content:encoded></item><item><title><![CDATA[Legacy Platforms Are Not the Enemy]]></title><link><![CDATA[https://www.azure-heros.com/blog/legacy-platforms-are-not-the-enemy]]></link><comments><![CDATA[https://www.azure-heros.com/blog/legacy-platforms-are-not-the-enemy#comments]]></comments><pubDate>Sat, 05 Apr 2025 21:00:00 GMT</pubDate><category><![CDATA[Uncategorized]]></category><guid isPermaLink="false">https://www.azure-heros.com/blog/legacy-platforms-are-not-the-enemy</guid><description><![CDATA[Almost every platform engineer experiences the same moment when joining a company with a long-running cloud platform.You open the repository.You start reading the Terraform code.You inspect the CI/CD pipelines.And suddenly… confusion.Your first instinct — especially if you've come through courses, reference architectures, or cloud conferences — is usually the same:"This needs a full rewrite. New landing zone. Clean Terraform structure. Modern pipelines. Best practices everywhere."It sounds [...] ]]></description><content:encoded><![CDATA[<div class="paragraph"><span style="color:#000000">Almost every platform engineer experiences the same moment when joining a company with a long-running cloud platform.</span><br><span style="color:#000000">You open the repository.</span><br><span style="color:#000000">You start reading the Terraform code.</span><br><span style="color:#000000">You inspect the CI/CD pipelines.</span><br><span style="color:#000000">And suddenly&hellip; confusion.</span><br></div><div><div class="wsite-image wsite-image-border-none" style="padding-top:10px;padding-bottom:10px;margin-left:0;margin-right:0;text-align:center"><a><img src="https://www.azure-heros.com/uploads/8/5/6/6/8566957/b2637feb-8f99-42e6-aefe-ff7138ceaebf_orig.png" alt="Picture" style="width:auto;max-width:100%"></a><div style="display:block;font-size:90%"></div></div></div><div><!--BLOG_SUMMARY_END--></div><div><div id="210836854677921105" align="left" style="width: 100%; overflow-y: hidden;" class="wcustomhtml"><article><p>Your first instinct &mdash; especially if you've come through courses, reference architectures, or cloud conferences &mdash; is usually the same:</p><div class="quote">"This needs a full rewrite. New landing zone. Clean Terraform structure. Modern pipelines. Best practices everywhere."</div><p>It sounds smart. It looks professional. And it is one of the most dangerous decisions a platform engineer can make.</p><hr><h2>Why "Just Rewrite It" Is a Trap</h2><p>That platform you're frustrated with is not theoretical. It has been running real production workloads for months &mdash; sometimes years. It survived:</p><ul><li>Incidents and outages</li><li>Compliance audits</li><li>Security exceptions</li><li>Scaling challenges</li><li>Real customer pressure</li></ul><p>Every ugly conditional, strange module boundary, or pipeline workaround likely exists because something broke in the past. That platform is the reason applications deploy today, teams deliver features, and the business generates revenue.</p><div class="danger-box">Destroying it without understanding it is not engineering excellence &mdash; it's risk.</div><hr><h2>Engineering Maturity Starts With Respect</h2><p>When I mentor platform engineers struggling with legacy Infrastructure as Code or DevOps setups, the first thing I do is stop the wrong kind of enthusiasm. Not because improvement is bad &mdash; but because reckless improvement is expensive.</p><div class="quote">Anyone can design a perfect landing zone on a whiteboard.<br>Real expertise is improving a live platform without breaking the business.</div><hr><h2>The "Big Rewrite" Fallacy</h2><p>A full rewrite assumes you can:</p><ul><li>Rediscover years of hidden business rules</li><li>Pause feature delivery without business impact</li><li>Not miss edge cases that were learned the hard way</li><li>Deliver something strictly better &mdash; not just prettier</li></ul><p>In reality, big rewrites often result in lost functionality, new security gaps, more incidents, and &mdash; most painfully &mdash; lost trust from stakeholders.</p><div class="callout">From management's perspective, you don't look like a savior. <strong>You look like a source of risk.</strong></div><hr><h2>How Strong Platform Engineers Handle Legacy Platforms</h2><div class="step"><div class="step-num">STEP 1</div><h3>Understand Before You Judge &mdash; Chesterton's Fence</h3><p>Before removing anything, ask why it exists. That strange Terraform condition or pipeline exception is probably there for a reason:</p><ul><li>A regulatory requirement someone negotiated under pressure</li><li>A workaround for a critical enterprise customer</li><li>A scar from a historical incident that took the platform down</li></ul><p class="step-footer">Remove it without understanding the context, and you may break something invisible &mdash; but essential.</p></div><div class="step"><div class="step-num">STEP 2</div><h3>Use the Strangler Pattern for Platforms</h3><p>You don't rebuild a landing zone overnight. Instead:</p><ul><li>Introduce new, well-designed Terraform modules alongside the old ones</li><li>Create new pipelines with better standards for new workloads</li><li>Let new workloads adopt the new patterns from day one</li></ul><p class="step-footer">Gradually, old components get isolated, legacy modules get replaced, and risk stays minimal. The business never stops.</p></div><div class="step"><div class="step-num">STEP 3</div><h3>Apply the Boy Scout Rule to IaC</h3><div class="quote">"Leave the code better than you found it."</div><p>Every time you touch the platform &mdash; even for a small fix &mdash; improve something:</p><ul><li>Fix a variable name</li><li>Extract a reusable module</li><li>Remove duplication</li><li>Add a missing comment or README entry</li></ul><p class="step-footer">Small, continuous improvements compound massively over time. You don't need a big bang to move forward.</p></div><div class="step"><div class="step-num">STEP 4</div><h3>Build Safety Nets Before You Refactor</h3><p>In platform engineering, safety nets are non-negotiable before touching anything:</p><ul><li><code>terraform plan</code> validations in every pipeline</li><li>Policy-as-Code to catch drift and violations</li><li>Drift detection on live environments</li><li>Integration and canary environments to validate changes safely</li></ul><p class="step-footer">You never refactor infrastructure blindly. You protect behavior first &mdash; then improve structure.</p></div><div class="takeaway"><h2>The Real Takeaway</h2><p>Engineering maturity is not about hating legacy platforms. It's about respecting what kept the company alive &mdash; and evolving it carefully.</p><p>This mindset shift is one of the hardest lessons in platform engineering:</p><p><strong>From</strong> "I know best practices" &rarr; <strong>To</strong> "I know how to apply them in production."</p><p>That shift separates engineers who can <em>design</em> platforms from engineers who can <em>own and evolve</em> them responsibly. And that is what real Platform Engineering is about.</p></div></article></div></div>]]></content:encoded></item><item><title><![CDATA[Understanding Azure Network Security: Differentiating Azure Firewall, WAF, DDoS Protection, and NSGs]]></title><link><![CDATA[https://www.azure-heros.com/blog/understanding-azure-network-security-differentiating-azure-firewall-waf-ddos-protection-and-nsgs]]></link><comments><![CDATA[https://www.azure-heros.com/blog/understanding-azure-network-security-differentiating-azure-firewall-waf-ddos-protection-and-nsgs#comments]]></comments><pubDate>Thu, 06 Feb 2025 21:00:00 GMT</pubDate><category><![CDATA[Uncategorized]]></category><guid isPermaLink="false">https://www.azure-heros.com/blog/understanding-azure-network-security-differentiating-azure-firewall-waf-ddos-protection-and-nsgs</guid><description><![CDATA[&#8203;In the realm of Azure's network security, understanding the distinct roles of services like Azure Firewall, Web Application Gateway (WAF), Distributed Denial of Service (DDoS) Protection, and Network Security Groups (NSGs) is pivotal for crafting a robust security architecture. Each service offers unique functionalities tailored to specific security needs.&#8203;             Azure Firewall is a cloud-native, fully managed network security service that safeguards Azure Virtual Network reso [...] ]]></description><content:encoded><![CDATA[<div class="paragraph">&#8203;<span>In the realm of Azure's network security, understanding the distinct roles of services like <strong>Azure Firewall</strong>, <strong>Web Application Gateway (WAF)</strong>, <strong>Distributed Denial of Service (DDoS) Protection</strong>, and <strong>Network Security Groups (NSGs)</strong> is pivotal for crafting a robust security architecture.</span> Each service offers unique functionalities tailored to specific security needs.&#8203;<br></div>  <div><div class="wsite-image wsite-image-border-none " style="padding-top:10px;padding-bottom:10px;margin-left:0;margin-right:0;text-align:center"> <a> <img src="https://www.azure-heros.com/uploads/8/5/6/6/8566957/application-gateway-before-azure-firewall-architecture_orig.png" alt="Picture" style="width:auto;max-width:100%" /> </a> <div style="display:block;font-size:90%"></div> </div></div>  <div>  <!--BLOG_SUMMARY_END--></div>  <div class="paragraph"><strong>Azure Firewall</strong> is a cloud-native, fully managed network security service that safeguards Azure Virtual Network resources. <span>It operates at both network and application layers, providing comprehensive traffic filtering.</span> <span>Key features include:</span>&#8203;<br /><br /><ul><li><strong>Comprehensive Filtering</strong>: <span>Inspects both inbound and outbound traffic, allowing or denying based on predefined rules.</span>&#8203;</li><li><strong>Threat Intelligence Integration</strong>: <span>Utilizes Microsoft's threat intelligence to block traffic from known malicious IP addresses and domains.</span>&#8203;</li><li><strong>High Availability and Scalability</strong>: <span>Automatically adjusts to changing traffic patterns, ensuring consistent protection without manual intervention.</span>&#8203;<br></li></ul></div>  <div><div class="wsite-image wsite-image-border-none " style="padding-top:10px;padding-bottom:10px;margin-left:0;margin-right:0;text-align:center"> <a> <img src="https://www.azure-heros.com/uploads/8/5/6/6/8566957/firewall-standard_orig.png" alt="Picture" style="width:auto;max-width:100%" /> </a> <div style="display:block;font-size:90%"></div> </div></div>  <div class="paragraph"><strong>Web Application Gateway (WAF)</strong> is designed to protect web applications from common threats and vulnerabilities, such as SQL injection and cross-site scripting attacks. <span>Deployed with services like Azure Application Gateway or Azure Front Door, WAF offers:</span>&#8203;<ul><li><strong>Application Layer Protection</strong>: <span>Monitors HTTP/HTTPS traffic, filtering out malicious requests targeting web applications.</span>&#8203;</li><li><strong>Predefined Rule Sets</strong>: <span>Employs managed rule sets based on the Open Web Application Security Project (OWASP) guidelines to address prevalent security risks.</span>&#8203;</li><li><strong>Customizable Rules</strong>: <span>Allows the creation of tailored rules to meet specific security requirements of applications</span></li></ul></div>  <div><div class="wsite-image wsite-image-border-none " style="padding-top:10px;padding-bottom:10px;margin-left:0;margin-right:0;text-align:center"> <a> <img src="https://www.azure-heros.com/uploads/8/5/6/6/8566957/how-application-gateway-works_orig.png" alt="Picture" style="width:auto;max-width:100%" /> </a> <div style="display:block;font-size:90%"></div> </div></div>  <div class="paragraph"><strong>Distributed Denial of Service (DDoS) Protection</strong> aims to maintain the availability of applications by mitigating the impact of DDoS attacks, which overwhelm resources with excessive traffic. <span>Azure's DDoS Protection provides:</span>&#8203;<br><br /><span></span><ul><li><strong>Traffic Monitoring and Mitigation</strong>: <span>Continuously observes traffic patterns and automatically mitigates attacks without user intervention.</span>&#8203;<br /><span></span></li><li><strong>Integration with Other Services</strong>: <span>Combining DDoS Protection with services like WAF enhances overall security posture, offering layered defense mechanisms.</span>&#8203;<br><br /><span></span></li></ul></div>  <div><div class="wsite-image wsite-image-border-none " style="padding-top:10px;padding-bottom:10px;margin-left:0;margin-right:0;text-align:center"> <a> <img src="https://www.azure-heros.com/uploads/8/5/6/6/8566957/4-distributed-denial-service_orig.png" alt="Picture" style="width:auto;max-width:100%" /> </a> <div style="display:block;font-size:90%"></div> </div></div>  <div class="paragraph"><strong>Network Security Groups (NSGs)</strong> function as virtual firewalls at the network layer, controlling traffic to and from Azure resources. <span>They offer:</span>&#8203;<ul><li><strong>Layer 3 and 4 Filtering</strong>: <span>Regulates inbound and outbound traffic based on IP addresses, ports, and protocols.</span>&#8203;</li><li><strong>Association Flexibility</strong>: <span>Can be linked to subnets or individual network interfaces, providing granular control over traffic flow.</span>&#8203;</li><li><strong>Rule-Based Access Control</strong>: <span>Utilizes security rules to explicitly allow or deny traffic, enhancing network segmentation and security.</span>&#8203;</li></ul></div>  <div><div class="wsite-image wsite-image-border-none " style="padding-top:10px;padding-bottom:10px;margin-left:0;margin-right:0;text-align:center"> <a> <img src="https://www.azure-heros.com/uploads/8/5/6/6/8566957/figure-1frfrffrfr_orig.png" alt="Picture" style="width:auto;max-width:100%" /> </a> <div style="display:block;font-size:90%"></div> </div></div>  <div class="paragraph"><strong>Designing a Robust Security Architecture in Azure</strong><br />To establish a secure and efficient network architecture in Azure, consider the following strategies:<ol><li><strong>Layered Security Approach</strong>: <span>Implement multiple security services in tandem to address various threat vectors effectively.</span>&#8203;</li><li><strong>Strategic Placement of Services</strong>:<ul><li><strong>Azure Firewall</strong>: <span>Deploy at the network perimeter to inspect and filter all traffic entering or leaving the virtual network.</span>&#8203;</li><li><strong>NSGs</strong>: <span>Apply to specific subnets or network interfaces to control internal traffic between resources.</span>&#8203;</li><li><strong>WAF</strong>: <span>Position in front of web applications to protect against application-layer attacks.</span>&#8203;</li><li><strong>DDoS Protection</strong>: <span>Enable at the network level to safeguard against volumetric attacks aiming to disrupt service availability.</span>&#8203;</li></ul></li><li><strong>Regular Monitoring and Updates</strong>: <span>Continuously monitor security logs and update rules and policies to adapt to evolving threats.</span>&#8203;</li><li><strong>Compliance and Best Practices</strong>: <span>Align security configurations with industry standards and organizational policies to ensure compliance and optimal protection.</span>&#8203;</li></ol> <span><br />By comprehensively understanding and appropriately implementing Azure's security services, organizations can construct a resilient network infrastructure that effectively mitigates potential threats and ensures the integrity and availability of their applications and data.</span>&#8203;<br /><br /></div>]]></content:encoded></item><item><title><![CDATA[Optimizing Azure SQL Database Costs with Hyperscale Elastic Pools]]></title><link><![CDATA[https://www.azure-heros.com/blog/optimizing-azure-sql-database-costs-with-hyperscale-elastic-pools]]></link><comments><![CDATA[https://www.azure-heros.com/blog/optimizing-azure-sql-database-costs-with-hyperscale-elastic-pools#comments]]></comments><pubDate>Wed, 22 Jan 2025 21:00:00 GMT</pubDate><category><![CDATA[Uncategorized]]></category><guid isPermaLink="false">https://www.azure-heros.com/blog/optimizing-azure-sql-database-costs-with-hyperscale-elastic-pools</guid><description><![CDATA[In today's data-driven landscape, organizations often grapple with managing large-scale databases efficiently while keeping costs in check. Azure SQL Database offers a solution tailored for such scenarios: the Hyperscale service tier. This tier is particularly beneficial for applications requiring expansive storage without proportionally high compute resources             One key benefit of the Hyperscale service tier over the General Purpose or Business Critical tiers is the decoupling of stora [...] ]]></description><content:encoded><![CDATA[<div class="paragraph"><span>In today's data-driven landscape, organizations often grapple with managing large-scale databases efficiently while keeping costs in check.</span> <span>Azure SQL Database offers a solution tailored for such scenarios: the <strong>Hyperscale</strong> service tier.</span> <span>This tier is particularly beneficial for applications requiring expansive storage without proportionally high compute resources</span><br></div>  <div><div class="wsite-image wsite-image-border-none " style="padding-top:10px;padding-bottom:10px;margin-left:0;margin-right:0;text-align:center"> <a> <img src="https://www.azure-heros.com/uploads/8/5/6/6/8566957/elastic-pool-hyperscale-architecture_orig.png" alt="Picture" style="width:auto;max-width:100%" /> </a> <div style="display:block;font-size:90%"></div> </div></div>  <div>  <!--BLOG_SUMMARY_END--></div>  <div class="paragraph"><span>One key benefit of the Hyperscale service tier over the General Purpose or Business Critical tiers is the decoupling of storage from compute resources.</span> <span>In Hyperscale, storage can grow to much larger sizes without necessitating an increase in DTU or vCore levels.</span> <span>For example, databases in Elastic Pools may approach the 3 TB storage limit at their current vCore tier.</span> <span>While additional vCores would be required to extend storage capacity beyond this limit in traditional tiers, Hyperscale allows storage to scale independently, eliminating the need for increased compute resources solely for additional storage capacity</span><br /><br /><font size="4"><strong>Understanding Hyperscale Elastic Pools</strong></font><br /><span><strong>Elastic pools</strong> in Azure SQL Database allow multiple databases to share a set of resources, optimizing performance and cost.</span> <span>The <strong>Hyperscale</strong> service tier enhances this model by providing:</span>&#8203;<ul><li><strong>Massive Storage Capacity</strong>: <span>Support for databases up to 128 TB, accommodating substantial data growth.</span> &#8203;</li><li><strong>Independent Scaling</strong>: <span>Decoupled compute and storage resources, enabling tailored performance configurations without unnecessary cost escalations.</span>&#8203;</li><li><strong>Rapid Scaling and Restore</strong>: <span>Quick adaptation to workload changes and swift backup operations, ensuring minimal downtim</span>e</li></ul></div>  <div class="paragraph"><font size="4"><strong>Architecture</strong></font><br />Traditionally, the <a href="https://learn.microsoft.com/en-us/azure/azure-sql/database/service-tier-hyperscale?view=azuresql#distributed-functions-architecture">architecture of a standalone Hyperscale database</a> consists of three main independent components: Compute, Storage ("Page Servers"), and the log ("Log Service"). When you create an elastic pool for your Hyperscale databases, the databases within the pool share compute and log resources. Additionally, if you choose to configure high availability, then each high availability pool is created with an equivalent and independent set of compute and log resources.<br />The following describes the architecture of an elastic pool for Hyperscale databases:<ul><li>A Hyperscale elastic pool consists of a primary pool that hosts primary Hyperscale databases and, if configured, up to four additional high-availability pools.</li><li>Primary Hyperscale databases hosted in the primary elastic pool share the SQL Server database engine (sqlservr.exe) compute process, vCores, memory, and SSD cache.</li><li>Configuring high availability for the primary pool creates additional high availability pools that contain read-only database replicas for the databases in the primary pool. Each primary pool can have a maximum of four high-availability replica pools. Each high-availability pool shares compute, SSD cache, and memory resources for all the secondary read-only databases in the pool.</li><li>Hyperscale databases in the primary elastic pool all share the same log service. Since databases in the high availability pools don't have a write workload, they don't utilize the log service.</li><li>Each Hyperscale database has its own set of page servers, and these page servers are shared between the primary database in the primary pool, and all secondary replica databases in the high availability pool.</li><li>Geo-replicated secondary Hyperscale databases can be placed inside another elastic pool.</li><li>Specifying ApplicationIntent=ReadOnly in your database connection string routes you to a read-only replica database in one of the high availability pools.</li></ul> The diagram (in the top) shows the architecture of an elastic pool for Hyperscale databases</div>  <div class="paragraph"><font size="4"><strong>Cost Efficiency with Hyperscale</strong></font><br /><span>A notable advantage of the Hyperscale tier is its potential for significant cost reductions, especially for large databases with moderate compute demands:</span>&#8203;<ul><li><strong>Compute and Storage Decoupling</strong>: <span>Unlike traditional tiers where storage size influences compute costs, Hyperscale allows independent scaling. This means you can allocate extensive storage without incurring high compute charges.</span>&#8203;</li><li><strong>Real-World Savings</strong>: <span>In practical scenarios, transitioning to Hyperscale has led to substantial savings. For instance, one of my customer experienced a 50% cost reduction by migrating to Hyperscale, benefiting from its flexible resource allocation.</span>&#8203;</li></ul></div>  <div class="paragraph"><strong>Convert non-Hyperscale databases to Hyperscale elastic pools using PowerShell</strong><br />You can use PowerShell commands to convert multiple General Purpose databases and add them to an existing Hyperscale elastic pool named hsep1. For example, the following sample script performs these steps:<br /><br /><ol><li>Use the <a href="https://learn.microsoft.com/en-us/powershell/module/az.sql/get-azsqlelasticpooldatabase">Get-AzSqlElasticPoolDatabase</a> cmdlet to list all the databases in the General Purpose elastic pool named gpep1.</li><li>The Where-Object cmdlet filters the list to only those database names starting with gpepdb.</li><li>For each database, <a href="https://learn.microsoft.com/en-us/powershell/module/az.sql/set-azsqldatabase">Set-AzSqlDatabase</a> cmdlet starts a conversion. In this case, you're implicitly requesting a conversion to the Hyperscale service tier by specifying the target Hyperscale elastic pool named hsep1.<ul><li>The -AsJob parameter allows each of the Set-AzSqlDatabase requests to run in parallel. If you prefer to run the conversions one-by-one, you can remove the -AsJob parameter.</li></ul></li></ol><br /><em><span><span>$dbs</span> = <span>Get-AzSqlElasticPoolDatabase</span><span> -ResourceGroupName</span> <span>"myResourceGroup"</span><span> -ServerName</span> <span>"mylogicalserver"</span><span> -ElasticPoolName</span> <span>"gpep1"</span> <span>$dbs</span> | <span>Where-Object</span> { <span>$_</span>.DatabaseName<span> -like</span> <span>"gpepdb*"</span> } | % { <span><br /><br />Set-AzSqlDatabase</span><span> -ResourceGroupName</span> <span>"myResourceGroup"</span><span> -ServerName</span> <span>"mylogicalserver"</span><span> -DatabaseName</span> (<span>$_</span>.DatabaseName)<span> -ElasticPoolName</span> <span>"hsep1"</span><span> -AsJob</span> }</span></em><br></div>  <div class="paragraph"><strong><font size="4">Limitations</font></strong><br />Consider the following limitations:<ul><li>Changing an existing non-Hyperscale elastic pool to the Hyperscale edition isn't supported. The <a href="https://learn.microsoft.com/en-us/azure/azure-sql/database/hyperscale-elastic-pool-overview?view=azuresql#convert-non-hyperscale-databases-to-hyperscale-elastic-pools">conversion section</a> provides some alternatives you can use.</li><li>Changing the edition of a Hyperscale elastic pool to a non-Hyperscale edition isn't supported.</li><li>In order to <a href="https://learn.microsoft.com/en-us/azure/azure-sql/database/reverse-migrate-from-hyperscale?view=azuresql">"reverse migrate"</a> an eligible database, which is in a Hyperscale elastic pool, it must first be removed from the Hyperscale elastic pool. The standalone Hyperscale database can then be "reverse migrated" to a General Purpose standalone database.</li><li>For the Hyperscale service tier, zone redundancy support can only be specified during database or elastic pool creation and can't be modified once the resource is provisioned. For more information, see <a href="https://learn.microsoft.com/en-us/azure/reliability/migrate-sql-database#downtime-requirements">Migrate Azure SQL Database to availability zone support</a>.</li><li>Adding a <a href="https://learn.microsoft.com/en-us/azure/azure-sql/database/service-tier-hyperscale-replicas?view=azuresql#named-replica">named replica</a> into a Hyperscale elastic pool isn't supported. Attempting to add a named replica of a Hyperscale database to a Hyperscale elastic pool results in an UnsupportedReplicationOperation error. Instead, create the named replica as a single Hyperscale database.</li></ul></div>  <div class="paragraph"><strong><font size="4">Seamless Migration and Flexibility</font></strong><br /><span>Migrating to the Hyperscale tier is designed to be straightforward:</span><ul><li><strong>Online Conversion</strong>: <span>The process involves an initial data copy while the source database remains online, followed by a brief cutover period, minimizing downtime.</span> &#8203;</li><li><strong>Reversibility</strong>: <span>If Hyperscale doesn't align with your requirements, reverse migration to other service tiers is possible, offering operational flexibility</span></li></ul> <strong><font size="4">Key Considerations</font></strong><br />When evaluating Hyperscale for your databases:<ul><li><strong>Workload Characteristics</strong>: <span>Ideal for applications with large data volumes but moderate compute needs, such as archival systems or data warehouses.</span>&#8203;</li><li><strong>Performance Requirements</strong>: <span>Ensure that the performance metrics of Hyperscale align with your application's demands.</span>&#8203;</li><li><strong>Cost-Benefit Analysis</strong>: <span>Assess the potential savings against your current expenditure to determine the financial viability.</span>&#8203;<br></li></ul><br> <strong><font size="4">Conclusion</font></strong><br /><span>Azure SQL Database's Hyperscale tier offers a compelling solution for managing large databases cost-effectively.</span> <span>Its ability to independently scale compute and storage resources provides organizations with the flexibility to optimize performance without unnecessary expenses.</span> <span>By carefully considering your workload requirements and leveraging Hyperscale's features, you can achieve significant cost savings while maintaining operational efficiency.</span>&#8203;<br /><br /><br /></div>]]></content:encoded></item><item><title><![CDATA[Network Segmentation Strategy on Azure for Secure and Efficient Virtual Networks]]></title><link><![CDATA[https://www.azure-heros.com/blog/network-segmentation-strategy-on-azure-for-secure-and-efficient-virtual-networks]]></link><comments><![CDATA[https://www.azure-heros.com/blog/network-segmentation-strategy-on-azure-for-secure-and-efficient-virtual-networks#comments]]></comments><pubDate>Fri, 03 Jan 2025 21:00:00 GMT</pubDate><category><![CDATA[Uncategorized]]></category><guid isPermaLink="false">https://www.azure-heros.com/blog/network-segmentation-strategy-on-azure-for-secure-and-efficient-virtual-networks</guid><description><![CDATA[Most customers I've encountered often approach Azure networking the same way they would with on-premises environments. For instance, they tend to create a dedicated VNet or subnet for each application, believing that this strategy will help organize their resources in the cloud             However, this approach can quickly lead to management complexity, unnecessary overhead, and an inability to fully leverage the scalability and flexibility that Azure provides. What many fail to realize is that [...] ]]></description><content:encoded><![CDATA[<div class="paragraph">Most customers I've encountered often approach Azure networking the same way they would with on-premises environments. For instance, they tend to create a <strong>dedicated VNet or subnet for each application</strong>, believing that this strategy will help organize their resources in the cloud</div>  <div><div class="wsite-image wsite-image-border-none " style="padding-top:10px;padding-bottom:10px;margin-left:0;margin-right:0;text-align:center"> <a> <img src="https://www.azure-heros.com/uploads/8/5/6/6/8566957/akamai-segmentation_orig.png" alt="Picture" style="width:auto;max-width:100%" /> </a> <div style="display:block;font-size:90%"></div> </div></div>  <div>  <!--BLOG_SUMMARY_END--></div>  <div class="paragraph">However, this approach can quickly lead to management complexity, unnecessary overhead, and an inability to fully leverage the scalability and flexibility that Azure provides. What many fail to realize is that networking in Azure&mdash;or in any cloud environment&mdash;is fundamentally different from on-premises network management.<br />In the cloud, resources are dynamically managed, and the network architecture should be designed with scalability, security, and flexibility in mind. Azure provides powerful tools that can help streamline network segmentation while ensuring that security is not compromised. In this post, we will explore a <strong>network segmentation strategy for Azure</strong> and how you can design efficient, secure, and scalable virtual networks.</div>  <div class="paragraph"><strong>Why Network Segmentation Matters</strong><br />Network segmentation in Azure allows you to isolate different parts of your infrastructure for security, management, and performance reasons. By segmenting a network into smaller sub-networks, organizations can achieve:<ul><li><strong>Improved Security</strong>: Isolating sensitive systems or resources from the rest of the network reduces the attack surface and minimizes the risk of lateral movement in the case of a breach.</li><li><strong>Optimized Performance</strong>: By controlling how traffic flows between segments, you can prioritize traffic for mission-critical applications and prevent congestion from non-essential resources.</li><li><strong>Better Compliance</strong>: Segmentation enables you to apply specific compliance controls to different segments, such as isolating regulatory workloads or applying stricter monitoring to sensitive data systems.</li><li><strong>Simplified Management</strong>: Network segmentation simplifies managing complex infrastructures by allowing you to apply specific policies and access controls based on the role of each segment.</li></ul></div>  <div class="paragraph"><strong>Key Elements of Network Segmentation in Azure</strong><br />Azure provides several key services that allow you to implement network segmentation and secure your virtual networks. Below are the main elements you should focus on when designing a segmentation strategy for Azure.<br /><br />1. <strong>Virtual Networks (VNets)</strong><br />Virtual Networks (VNets) are the foundation of any Azure network. A VNet provides a logically isolated network that allows you to securely connect Azure resources. By dividing your VNet into smaller segments, you can isolate traffic, control access, and apply specific policies to each segment.<br /><br /><strong>Best practices for using VNets for segmentation</strong>:<ul><li>Create multiple VNets for different environments (e.g., dev, test, production).</li><li>Use VNets to separate workloads with different security or performance requirements.</li><li>For multi-region or hybrid environments, ensure you properly design the connectivity between VNets.</li></ul><br />2. <strong>Subnets</strong><br />Within a VNet, <strong>subnets</strong> help divide the network into smaller, isolated blocks. Each subnet can be assigned its own <strong>Network Security Group (NSG)</strong> and <strong>Route Table</strong> to control traffic, making it easier to manage and secure different parts of the network.<br /><br /><strong>Best practices for using subnets</strong>:<ul><li><strong>Separate critical workloads</strong>: Place mission-critical workloads in isolated subnets with strict NSG rules to limit access.</li><li><strong>Utilize service-specific subnets</strong>: Consider creating subnets for specific services, such as Azure App Services, databases, or Kubernetes clusters.</li><li><strong>Consider scalability</strong>: Plan for future growth by ensuring subnets are large enough to accommodate the resources you may add in the future.</li></ul><br />3. <strong>Network Security Groups (NSGs)</strong><br /><strong>NSGs</strong> are used to define inbound and outbound traffic rules at the subnet or network interface level. NSGs allow you to specify which IP addresses or ranges can access your resources, ensuring that only authorized traffic can flow between segments.<br /><br /><strong>Best practices for using NSGs</strong>:<ul><li>Use <strong>least privilege access</strong> by restricting traffic to only necessary ports and protocols.</li><li>Apply NSGs to each subnet to isolate traffic based on the workload's security requirements.</li><li>Regularly audit and update your NSG rules as part of a continuous security strategy.</li></ul> 4. <strong>Azure Firewall</strong>Azure Firewall is a managed, cloud-based network security service that provides centralized protection for your Azure VNets. It enables you to enforce security policies across all your network segments, providing a perimeter security layer that protects against threats.<br /><br /><strong>Best practices for using Azure Firewall</strong>:<ul><li>Use <strong>Azure Firewall</strong> as the central entry/exit point for network traffic to enforce security rules consistently across segments.</li><li>Leverage <strong>FQDN filtering</strong>, <strong>application rules</strong>, and <strong>threat intelligence</strong> to protect against malicious activities.</li><li>Enable <strong>Firewall Policy</strong> to streamline policy management for multiple VNets and subnets.</li></ul><br />5. <strong>Private Endpoints</strong><br />Azure <strong>Private Endpoints</strong> enable secure, private connections to Azure services over a VNet. By using private endpoints, you can ensure that services such as Azure Storage, Azure SQL Database, or Azure Key Vault are accessible only within your virtual network, adding an extra layer of security.<br /><br /><strong>Best practices for using Private Endpoints</strong>:<ul><li>Use <strong>Private Endpoints</strong> to limit access to services and ensure that sensitive data does not traverse the public internet.</li><li>Enable private DNS zones to facilitate seamless resolution of private endpoint addresses.</li><li>Use <strong>Azure Bastion</strong> for secure, private remote access to virtual machines within your network without exposing them to the public internet.</li></ul> 6. <strong>Azure Bastion</strong><br />Azure Bastion provides secure and seamless RDP/SSH connectivity to your Azure virtual machines directly from the Azure portal without exposing your VMs to the public internet. It enhances security by eliminating the need for a public IP address on VMs.<br /><br /><strong>Best practices for using Azure Bastion</strong>:<ul><li>Use <strong>Azure Bastion</strong> for secure administrative access to virtual machines in segmented subnets, particularly in production or sensitive environments.</li><li>Ensure that <strong>Bastion hosts</strong> are deployed in a dedicated subnet with strict access control to prevent unauthorized access.</li></ul> 7. <strong>Virtual WAN (vWAN)</strong><br /><strong>Azure Virtual WAN</strong> is a networking service that enables you to connect different VNets across regions and on-premises networks. It simplifies the management of large-scale network architectures and ensures secure communication between remote locations.<br /><br /><strong>Best practices for using Azure vWAN</strong>:<ul><li>Use <strong>Azure vWAN</strong> to simplify and centralize the management of multiple VNets and integrate them with on-premises networks securely.</li><li>Consider <strong>hub-and-spoke topology</strong> for better segmentation, where the central hub acts as the security and routing point for all traffic.</li></ul></div>  <div class="paragraph"><strong>Best Practices for Network Segmentation on Azure</strong><ol><li><strong>Segment by Function and Security Level</strong>: Group resources with similar functions and security requirements into separate subnets and VNets. For example, isolate the <strong>database subnet</strong> from the <strong>web application subnet</strong> and place critical systems in higher security zones.<br></li><li><strong>Use Hub-and-Spoke Architecture</strong>: A hub-and-spoke model allows you to centralize connectivity, monitoring, and security in the hub while isolating the workloads in the spoke subnets. This design minimizes the attack surface and provides easy management of shared resources.</li><li><strong>Leverage Network Peering and Service Endpoints</strong>: Use <strong>VNet Peering</strong> to securely connect VNets, enabling communication between isolated segments without exposing resources to the public internet. Utilize <strong>service endpoints</strong> to connect to Azure services securely from within a VNet.</li><li><strong>Apply Zero Trust Principles</strong>: Implement <strong>Zero Trust</strong> network principles by assuming that every user and device, both internal and external, is untrusted. Ensure robust access control, encryption, and continuous monitoring.</li><li><strong>Regularly Audit and Update Network Policies</strong>: Security is a continuous process. Regularly audit network segmentation, update NSG rules, and adjust Azure Firewall policies to respond to changing security threats and business needs.<br /><br /></li></ol></div>  <div class="paragraph"><strong><font size="4">Conclusion</font></strong><br />Network segmentation is a critical strategy for enhancing both the <strong>security</strong> and <strong>efficiency</strong> of your Azure environment. By segmenting your virtual networks, applying strict access controls, and leveraging Azure's powerful networking tools, you can protect sensitive workloads, optimize traffic, and ensure your cloud infrastructure remains secure.<br />By following the best practices outlined above, you can build a highly secure, efficient, and scalable network architecture on Azure that supports your business needs while safeguarding your resources. Whether you're managing a hybrid environment, working with sensitive data, or simply need to streamline your network, Azure's segmentation tools provide the flexibility you need to succeed.<br /><br /></div>]]></content:encoded></item><item><title><![CDATA[Terraform Ephemeral Resources]]></title><link><![CDATA[https://www.azure-heros.com/blog/terraform-ephemeral-resources]]></link><comments><![CDATA[https://www.azure-heros.com/blog/terraform-ephemeral-resources#comments]]></comments><pubDate>Sun, 01 Dec 2024 21:00:00 GMT</pubDate><category><![CDATA[Uncategorized]]></category><guid isPermaLink="false">https://www.azure-heros.com/blog/terraform-ephemeral-resources</guid><description><![CDATA[Terraform 1.10 introduced a groundbreaking concept called ephemeral resources. An ephemeral resource is not persisted to the state file. Take a moment to let that sink in!Ephemeral resources address a long-standing issue: secret values being stored in the state file as plaintext. With ephemeral resources, your secrets are no longer at risk if the state file is compromised. This solution is particularly valuable for enhancing the security of sensitive data.             Initially, only a few provi [...] ]]></description><content:encoded><![CDATA[<div class="paragraph"><span>Terraform 1.10 introduced a groundbreaking concept called </span><span><strong>ephemeral resources</strong></span><span>. An ephemeral resource is not persisted to the state file. Take a moment to let that sink in!</span><br /><span></span><span>Ephemeral resources address a long-standing issue: secret values being stored in the state file as plaintext. With ephemeral resources, your secrets are no longer at risk if the state file is compromised. This solution is particularly valuable for enhancing the security of sensitive data.</span><br><br /><span></span></div>  <div><div class="wsite-image wsite-image-border-none " style="padding-top:10px;padding-bottom:10px;margin-left:0;margin-right:0;text-align:center"> <a> <img src="https://www.azure-heros.com/uploads/8/5/6/6/8566957/1-xlkmum-us1cyp5phix4aka_orig.png" alt="Picture" style="width:auto;max-width:100%" /> </a> <div style="display:block;font-size:90%"></div> </div></div>  <div>  <!--BLOG_SUMMARY_END--></div>  <div class="paragraph"><span>Initially, only a few providers support ephemeral resources. As of now, these include:</span><ul><li><span><strong>Microsoft Azure (azurerm):</strong></span><br /><br /><ul><li><span>azurerm_key_vault_secret</span></li><li><span>azurerm_key_vault_certificate</span></li></ul></li><li><span><strong>Kubernetes (kubernetes):</strong></span><ul><li><span>kubernetes_token_request</span></li><li><span>kubernetes_certificate_signing_request</span></li></ul></li></ul> <span>This list is expected to expand over time.</span><span>Declaring an Ephemeral Resource</span><span>Ephemeral resources introduce a new root-level block in HCL: the </span><span>ephemeral</span><span> block. Its syntax resembles a regular resource block:</span><br /><span></span><br /></div>  <div class="paragraph"><strong>ephemeral </strong>"&lt;resource type&gt;" "&lt;resource name&gt;" {<br />&nbsp; # attributes, meta-arguments, nested blocks<br />}<br></div>  <div class="paragraph"><span><strong>ephemeral </strong>"&lt;resource type&gt;" "&lt;resource name&gt;"<br /> { <br /># attributes, meta-arguments, nested blocks <br />}<br /></span><span>Similar to normal resources, supported attributes and nested blocks vary based on the resource type.</span><br /><br /><span>Using an Ephemeral Resource</span><span>Referencing an ephemeral resource is analogous to referencing a data source. Such references use the </span><span>ephemeral.</span><span> prefix.</span><br /><span>For example:</span><br /><br /><strong>ephemeral </strong>"azurerm_key_vault_secret" "<span>secret</span>" {<br />&nbsp; # attributes<br />}<br /><span>You can access its attributes using </span><strong><span>ephemeral.azurerm_key_vault_secret.secret.&lt;attribute&gt;</span><span>.</span></strong><br /><br /><span>Ephemeral resources can only be used in contexts where their values are not stored in the state file. Supported contexts include:</span><br /><br /><ul><li><span>Other ephemeral resource blocks</span><br /><br /></li><li><span>Local values</span><br /><br /></li><li><span>Ephemeral variable and output blocks (discussed below)</span></li><li><span>Provider configurations within </span><span>provider</span><span> blocks</span></li><li><span>Provisioner and connection blocks in regular resources</span></li></ul> <span>These restrictions ensure the security and temporary nature of ephemeral resources. For example, referencing an ephemeral resource in a state-persisted context would defeat its purpose.</span><br /><span>When used in local values, ephemeral references implicitly create </span><span><strong>ephemeral local values</strong></span><span>. You cannot explicitly declare ephemeral locals; they are only derived through ephemeral references.</span><br /><br /><strong><span>Example: Using Ephemeral Resources</span></strong><br /><br /></div>  <div class="paragraph"># Read secrets from AWS Secrets Manager<br />ephemeral "aws_secretsmanager_secret_version" "secret" {<br />&nbsp; secret_id = "&lt;secret id&gt;"<br />}<br /><br />locals {<br />&nbsp; # Decode the JSON secret value<br />&nbsp; credentials = jsondecode(ephemeral.aws_secretsmanager_secret_version.db.secret_string)<br />}<br /><br /># Configure the PostgreSQL provider using the credentials<br />provider "postgresql" {<br />&nbsp; host&nbsp;&nbsp;&nbsp;&nbsp; = "&lt;postgres endpoint&gt;"<br />&nbsp; port&nbsp;&nbsp;&nbsp;&nbsp; = 5432<br />&nbsp; username = local.credentials["username"]<br />&nbsp; password = local.credentials["password"]<br />}<br /><span>In this example, the ephemeral resource </span><span>aws_secretsmanager_secret_version</span><span> retrieves a PostgreSQL database password. The password is JSON-decoded into a local value and used to configure the PostgreSQL provider&mdash;all without persisting the sensitive data in the state file.</span><br /><span>Supported Meta-Arguments</span><span>Ephemeral resources support the following meta-arguments:</span><ul><li><span>depends_on</span><span>: Define explicit dependencies</span></li><li><span>count</span><span>: Create multiple identical ephemeral resources</span></li><li><span>for_each</span><span>: Create one ephemeral resource for each value in a set or map</span></li><li><span>provider</span><span>: Use a provider alias</span></li><li><span>lifecycle</span><span>: Hook into the resource lifecycle</span></li></ul><span>However, ephemeral resources do not support the </span><span>provisioner</span><span> meta-argument&mdash;a best practice you should generally avoid anyway.</span><br /><br /><br /></div>  <div class="paragraph"><span>The Lifecycle of an Ephemeral Resource</span><span>Ephemeral resources behave differently from regular resources and data sources. They are </span><span><strong>opened</strong></span><span> (or read) when Terraform needs their values and </span><span><strong>closed</strong></span><span> when those values are no longer required. The specifics of opening and closing depend on the resource type.</span><br /><span>For instance, in HashiCorp Vault, opening a secret means obtaining a lease, and closing it means explicitly ending that lease. Most importantly, ephemeral resources ensure that their values are never stored in the state file.</span><br /><br /><span><strong>Summary</strong><br /></span><span>Ephemeral resources, variables, and outputs are a powerful addition to Terraform. They eliminate the risk of sensitive values being stored as plaintext in the state file, addressing a long-standing security concern.</span><br /><span>While the state file will still contain other sensitive information, such as a complete map of your infrastructure, ephemeral resources significantly reduce its sensitivity. By leveraging these new capabilities, you can build more secure and robust Terraform configurations.</span><br /><span>Ephemeral resources mark a significant step forward in Terraform&rsquo;s evolution, and their adoption is expected to grow rapidly in the coming years.</span><br /><br /></div>]]></content:encoded></item></channel></rss>