<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Terraform - Azure Databricks workspace without NAT gateway in Administration &amp; Architecture</title>
    <link>https://community.databricks.com/t5/administration-architecture/terraform-azure-databricks-workspace-without-nat-gateway/m-p/95517#M2137</link>
    <description>&lt;P&gt;try by adding more properties:&lt;/P&gt;&lt;P&gt;Also,&amp;nbsp;&lt;SPAN&gt;Ensure that the subnets used by Azure Databricks do not have settings that require a NAT gateway.&lt;/SPAN&gt;&lt;SPAN&gt;Consider using private endpoints for Azure Databricks to avoid the need for a NAT gateway.&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;infrastructure_encryption_enabled&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;true&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;public_network_access_enabled&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;false&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;network_security_group_rules_required&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;"NoAzureDatabricksRules"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;custom_parameters&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;STRONG&gt;no_public_ip &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = true&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;lifecycle&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ignore_changes&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;[&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;tags&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 22 Oct 2024 14:43:58 GMT</pubDate>
    <dc:creator>saurabh18cs</dc:creator>
    <dc:date>2024-10-22T14:43:58Z</dc:date>
    <item>
      <title>Terraform - Azure Databricks workspace without NAT gateway</title>
      <link>https://community.databricks.com/t5/administration-architecture/terraform-azure-databricks-workspace-without-nat-gateway/m-p/94389#M2088</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have experienced an increase in costs - even when not using Databricks compute.&lt;/P&gt;&lt;P&gt;It is due to the NAT-gateway, that are (suddenly) automatically deployed.&lt;/P&gt;&lt;P&gt;When creating Azure Databricks workspaces using Terraform:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LauJohansson_0-1729142670306.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/12006iE9158EB1BDF0A912/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LauJohansson_0-1729142670306.png" alt="LauJohansson_0-1729142670306.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;A NAT-gateway is created.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I create the workspace using Azure Portal UI:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LauJohansson_1-1729142785587.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/12007i9A78DC66B320AFF7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LauJohansson_1-1729142785587.png" alt="LauJohansson_1-1729142785587.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the resources:&amp;nbsp;&lt;SPAN&gt;Managed Identity,&amp;nbsp;Storage account,&amp;nbsp;Access Connector for Azure Databricks,&amp;nbsp;Network security group and&amp;nbsp;Virtual network!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;No NAT gateway is created!&lt;/P&gt;&lt;P&gt;How do I mirror the setup without a gateway?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also see this medium post:&amp;nbsp;&lt;A href="https://medium.com/@optiman87/how-to-disable-nat-gateway-for-azure-databricks-11447015d917" target="_blank"&gt;https://medium.com/@optiman87/how-to-disable-nat-gateway-for-azure-databricks-11447015d917&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2024 05:30:37 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/terraform-azure-databricks-workspace-without-nat-gateway/m-p/94389#M2088</guid>
      <dc:creator>LauJohansson</dc:creator>
      <dc:date>2024-10-17T05:30:37Z</dc:date>
    </item>
    <item>
      <title>Re: Terraform - Azure Databricks workspace without NAT gateway</title>
      <link>https://community.databricks.com/t5/administration-architecture/terraform-azure-databricks-workspace-without-nat-gateway/m-p/95517#M2137</link>
      <description>&lt;P&gt;try by adding more properties:&lt;/P&gt;&lt;P&gt;Also,&amp;nbsp;&lt;SPAN&gt;Ensure that the subnets used by Azure Databricks do not have settings that require a NAT gateway.&lt;/SPAN&gt;&lt;SPAN&gt;Consider using private endpoints for Azure Databricks to avoid the need for a NAT gateway.&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;infrastructure_encryption_enabled&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;true&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;public_network_access_enabled&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;false&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;network_security_group_rules_required&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;"NoAzureDatabricksRules"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;custom_parameters&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;STRONG&gt;no_public_ip &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = true&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;lifecycle&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;ignore_changes&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;[&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;tags&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 22 Oct 2024 14:43:58 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/terraform-azure-databricks-workspace-without-nat-gateway/m-p/95517#M2137</guid>
      <dc:creator>saurabh18cs</dc:creator>
      <dc:date>2024-10-22T14:43:58Z</dc:date>
    </item>
    <item>
      <title>Re: Terraform - Azure Databricks workspace without NAT gateway</title>
      <link>https://community.databricks.com/t5/administration-architecture/terraform-azure-databricks-workspace-without-nat-gateway/m-p/119655#M3376</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Unfortunately, you need to explicitly define each resource of the non-&lt;EM&gt;NAT-gateway&lt;/EM&gt; pattern, if you want to replicate the setup as it is deployed using Azure portal. For me, the following TF declaration did the job:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;provider "azurerm" {
  features {}
}


# Define the resource group (optional: if created inside the module)
resource "azurerm_resource_group" "rg" {
  name     = var.resource_group_name
  location = var.location
}

resource "azurerm_virtual_network" "databricks" {
  name                = "databricks-vnet"
  resource_group_name = azurerm_resource_group.rg.name
  location            = azurerm_resource_group.rg.location
  address_space       = ["10.179.0.0/16"]
}

resource "azurerm_subnet" "public" {
  name                 = "public-subnet"
  resource_group_name  = azurerm_resource_group.rg.name
  virtual_network_name = azurerm_virtual_network.databricks.name
  address_prefixes     = ["10.179.1.0/24"]
  service_endpoints    = ["Microsoft.Storage"]
  delegation {
    name = "databricks_delegation"
    service_delegation {
      name = "Microsoft.Databricks/workspaces"
      actions = [
        "Microsoft.Network/virtualNetworks/subnets/action"
      ]
    }
  }
}

resource "azurerm_subnet" "private" {
  name                 = "private-subnet"
  resource_group_name  = azurerm_resource_group.rg.name
  virtual_network_name = azurerm_virtual_network.databricks.name
  address_prefixes     = ["10.179.2.0/24"]
  service_endpoints    = ["Microsoft.Storage"]
  delegation {
    name = "databricks_delegation"
    service_delegation {
      name = "Microsoft.Databricks/workspaces"
      actions = [
        "Microsoft.Network/virtualNetworks/subnets/action"
      ]
    }
  }
}

resource "azurerm_network_security_group" "public" {
  name                = "databricks-public-nsg"
  location            = azurerm_resource_group.rg.location
  resource_group_name = azurerm_resource_group.rg.name
}

resource "azurerm_subnet_network_security_group_association" "public" {
  subnet_id                 = azurerm_subnet.public.id
  network_security_group_id = azurerm_network_security_group.public.id
}

resource "azurerm_network_security_group" "private" {
  name                = "databricks-private-nsg"
  location            = azurerm_resource_group.rg.location
  resource_group_name = azurerm_resource_group.rg.name
}

resource "azurerm_subnet_network_security_group_association" "private" {
  subnet_id                 = azurerm_subnet.private.id
  network_security_group_id = azurerm_network_security_group.private.id
}

# Define the Databricks workspace
resource "azurerm_databricks_workspace" "workspace" {
  name                       = var.workspace_name
  resource_group_name        = azurerm_resource_group.rg.name
  location                   = azurerm_resource_group.rg.location
  sku                        = var.workspace_sku
  public_network_access_enabled = true
  #network_security_group_rules_required               = "AllRules"
  managed_resource_group_name = var.managed_resource_group_name

  custom_parameters {
    virtual_network_id  = azurerm_virtual_network.databricks.id
    public_subnet_name  = azurerm_subnet.public.name
    private_subnet_name = azurerm_subnet.private.name
    public_subnet_network_security_group_association_id  = azurerm_subnet_network_security_group_association.public.id
    private_subnet_network_security_group_association_id = azurerm_subnet_network_security_group_association.private.id
    no_public_ip = true
  }
}
&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 19 May 2025 20:34:04 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/terraform-azure-databricks-workspace-without-nat-gateway/m-p/119655#M3376</guid>
      <dc:creator>Chris_123</dc:creator>
      <dc:date>2025-05-19T20:34:04Z</dc:date>
    </item>
    <item>
      <title>Re: Terraform - Azure Databricks workspace without NAT gateway</title>
      <link>https://community.databricks.com/t5/administration-architecture/terraform-azure-databricks-workspace-without-nat-gateway/m-p/121069#M3446</link>
      <description>&lt;P&gt;In Azure Databricks, a NAT Gateway will be required (by Microsoft) for all egress from VMs, which affects Databricks compute:&amp;nbsp;&lt;A href="https://azure.microsoft.com/en-us/updates?id=default-outbound-access-for-vms-in-azure-will-be-retired-transition-to-a-new-method-of-internet-access" target="_blank"&gt;Azure updates | Microsoft Azure&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jun 2025 15:22:21 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/terraform-azure-databricks-workspace-without-nat-gateway/m-p/121069#M3446</guid>
      <dc:creator>Rjdudley</dc:creator>
      <dc:date>2025-06-05T15:22:21Z</dc:date>
    </item>
  </channel>
</rss>

