<?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: How can I use Terraform to assign an external location to multiple workspaces? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-can-i-use-terraform-to-assign-an-external-location-to/m-p/116084#M45240</link>
    <description>&lt;P&gt;Currently, managing multi-workspace bindings for external locations entirely through Terraform is a limitation.&lt;/P&gt;</description>
    <pubDate>Mon, 21 Apr 2025 14:36:25 GMT</pubDate>
    <dc:creator>Walter_C</dc:creator>
    <dc:date>2025-04-21T14:36:25Z</dc:date>
    <item>
      <title>How can I use Terraform to assign an external location to multiple workspaces?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-use-terraform-to-assign-an-external-location-to/m-p/115729#M45169</link>
      <description>&lt;P&gt;How can I use Terraform to assign an external location to multiple workspaces?&lt;/P&gt;&lt;P&gt;When I create an external location with Terraform, I do not see any option to directly link workspaces. it also only links to the workspace of the databricks profile that I use to deploy Terraform.&lt;/P&gt;&lt;P&gt;I can assign a second workspace manually with the UI, but how do I do it with Terraform?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VicS_0-1744880469889.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/16055i4CC63EED335B6BE1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VicS_0-1744880469889.png" alt="VicS_0-1744880469889.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My current Terraform code looks like this:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;resource "databricks_external_location" "extloc" {
name = "external-location-name"
url = "abfss://%s@%s.dfs.core.windows.net"
credential_name = "xxxxxxx"
owner = "xxxxxxx"
isolation_mode = "ISOLATION_MODE_ISOLATED"
comment = "Created by Terraform"
}

resource "databricks_grants" "ggggggg" {
external_location = databricks_external_location.extloc.id
grant {
principal = "xyz"
privileges = ["ALL_PRIVILEGES"]
}
grant {
principal = "abc"
privileges = ["ALL_PRIVILEGES"]
}
depends_on = [databricks_external_location.extloc]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 09:01:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-use-terraform-to-assign-an-external-location-to/m-p/115729#M45169</guid>
      <dc:creator>VicS</dc:creator>
      <dc:date>2025-04-17T09:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use Terraform to assign an external location to multiple workspaces?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-use-terraform-to-assign-an-external-location-to/m-p/116084#M45240</link>
      <description>&lt;P&gt;Currently, managing multi-workspace bindings for external locations entirely through Terraform is a limitation.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Apr 2025 14:36:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-use-terraform-to-assign-an-external-location-to/m-p/116084#M45240</guid>
      <dc:creator>Walter_C</dc:creator>
      <dc:date>2025-04-21T14:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use Terraform to assign an external location to multiple workspaces?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-use-terraform-to-assign-an-external-location-to/m-p/116119#M45244</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/88823"&gt;@Walter_C&lt;/a&gt;&amp;nbsp;I think you need to use&amp;nbsp;&lt;STRONG&gt;databricks_workspace_binding&lt;/STRONG&gt;&amp;nbsp;resource for that multi-workspace binding.&amp;nbsp; I was able to achieve it in Terraform. The &lt;A href="https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/workspace_binding" target="_self"&gt;resource docs&lt;/A&gt; seem to agree with result that I have. My Databricks runs on Google Cloud.&lt;/P&gt;&lt;P&gt;My Terraform configuration: &lt;A href="https://gist.github.com/olliefr/150bf46686efabb02a3e184b58e3bdfa" target="_blank" rel="noopener"&gt;GitHub Gist&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/132397"&gt;@VicS&lt;/a&gt;&amp;nbsp;I think the reason your external location gets assigned to the "current" workspace - by which I mean the workspace you referenced in your Databricks Terraform provider configuration (host parameter) - is because you've specified&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;isolation_mode = "ISOLATION_MODE_ISOLATED"&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;By default, Databricks assigns the securable to all workspaces attached to the current metastore but when you set this parameter then you get the behaviour that you see in your case. At least that's what&amp;nbsp;&lt;A href="https://registry.terraform.io/providers/databricks/databricks/latest/docs/resources/external_location#isolation_mode-2" target="_self"&gt;databricks_external_location&lt;/A&gt;&amp;nbsp; docs say.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Apr 2025 01:20:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-use-terraform-to-assign-an-external-location-to/m-p/116119#M45244</guid>
      <dc:creator>TheRealOliver</dc:creator>
      <dc:date>2025-04-22T01:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use Terraform to assign an external location to multiple workspaces?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-use-terraform-to-assign-an-external-location-to/m-p/116126#M45248</link>
      <description>&lt;P&gt;I can't create two&amp;nbsp;&lt;SPAN&gt;databricks_external_location for the same external location (within one metastore), so that won't work.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Apr 2025 05:46:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-use-terraform-to-assign-an-external-location-to/m-p/116126#M45248</guid>
      <dc:creator>VicS</dc:creator>
      <dc:date>2025-04-22T05:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use Terraform to assign an external location to multiple workspaces?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-use-terraform-to-assign-an-external-location-to/m-p/116133#M45249</link>
      <description>&lt;P&gt;&amp;nbsp;The isolation mode setting was required as I do not want to give access to every other workspace, only those specific two. Your solution to extend the access to another workspace with the "databricks_workspace_binding" worked though, thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Apr 2025 06:16:44 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-use-terraform-to-assign-an-external-location-to/m-p/116133#M45249</guid>
      <dc:creator>VicS</dc:creator>
      <dc:date>2025-04-22T06:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use Terraform to assign an external location to multiple workspaces?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-use-terraform-to-assign-an-external-location-to/m-p/116177#M45257</link>
      <description>&lt;P&gt;But I don't have two `databricks_external_location`s in my Terraform? I create two bindings to a single location.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Apr 2025 11:22:11 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-use-terraform-to-assign-an-external-location-to/m-p/116177#M45257</guid>
      <dc:creator>TheRealOliver</dc:creator>
      <dc:date>2025-04-22T11:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: How can I use Terraform to assign an external location to multiple workspaces?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-can-i-use-terraform-to-assign-an-external-location-to/m-p/116200#M45264</link>
      <description>&lt;P&gt;It was in response to the comment by "omwer21s" &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Your solution works.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Apr 2025 13:47:40 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-can-i-use-terraform-to-assign-an-external-location-to/m-p/116200#M45264</guid>
      <dc:creator>VicS</dc:creator>
      <dc:date>2025-04-22T13:47:40Z</dc:date>
    </item>
  </channel>
</rss>

