<?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 Creating an Azure-Keyvault-backed secret scope with terraform in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/creating-an-azure-keyvault-backed-secret-scope-with-terraform/m-p/98798#M39845</link>
    <description>&lt;P&gt;We want to create an Azure-Keyvault-backed secret scope with terraform - while we are able to do it via the UI with the URL &lt;A href="https://adb-xxxxxxxx.x.azuredatabricks.net/?o=xxxxxxxxxxxxxx" target="_blank" rel="noopener"&gt;https://adb-xxxxxxxx.x.azuredatabricks.net/?o=xxxxxxxxxxxxxx&lt;/A&gt;&lt;STRONG&gt;#secrets/createScope&lt;/STRONG&gt;, I'm unable to do it with Terraform.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;resource "databricks_secret_scope" "this" {
  name = "my-keyvault-name"
  keyvault_metadata {
    resource_id = "/subscriptions/x/resourceGroups/x/providers/Microsoft.KeyVault/vaults/my-keyvault-name"
    dns_name    = "my-keyvault-name.vault.azure.net/"
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In case it's relevant: while running Terraform we authenticate with a browser-pop up with our ActiveDirectory to authenticate against and deploy the Azure ressources.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Nov 2024 13:08:45 GMT</pubDate>
    <dc:creator>VicS</dc:creator>
    <dc:date>2024-11-14T13:08:45Z</dc:date>
    <item>
      <title>Creating an Azure-Keyvault-backed secret scope with terraform</title>
      <link>https://community.databricks.com/t5/data-engineering/creating-an-azure-keyvault-backed-secret-scope-with-terraform/m-p/98798#M39845</link>
      <description>&lt;P&gt;We want to create an Azure-Keyvault-backed secret scope with terraform - while we are able to do it via the UI with the URL &lt;A href="https://adb-xxxxxxxx.x.azuredatabricks.net/?o=xxxxxxxxxxxxxx" target="_blank" rel="noopener"&gt;https://adb-xxxxxxxx.x.azuredatabricks.net/?o=xxxxxxxxxxxxxx&lt;/A&gt;&lt;STRONG&gt;#secrets/createScope&lt;/STRONG&gt;, I'm unable to do it with Terraform.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;resource "databricks_secret_scope" "this" {
  name = "my-keyvault-name"
  keyvault_metadata {
    resource_id = "/subscriptions/x/resourceGroups/x/providers/Microsoft.KeyVault/vaults/my-keyvault-name"
    dns_name    = "my-keyvault-name.vault.azure.net/"
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In case it's relevant: while running Terraform we authenticate with a browser-pop up with our ActiveDirectory to authenticate against and deploy the Azure ressources.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 13:08:45 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/creating-an-azure-keyvault-backed-secret-scope-with-terraform/m-p/98798#M39845</guid>
      <dc:creator>VicS</dc:creator>
      <dc:date>2024-11-14T13:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an Azure-Keyvault-backed secret scope with terraform</title>
      <link>https://community.databricks.com/t5/data-engineering/creating-an-azure-keyvault-backed-secret-scope-with-terraform/m-p/98816#M39849</link>
      <description>&lt;P&gt;Could you share with us what error message you get?&lt;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2024 13:55:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/creating-an-azure-keyvault-backed-secret-scope-with-terraform/m-p/98816#M39849</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2024-11-14T13:55:06Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an Azure-Keyvault-backed secret scope with terraform</title>
      <link>https://community.databricks.com/t5/data-engineering/creating-an-azure-keyvault-backed-secret-scope-with-terraform/m-p/98820#M39851</link>
      <description>&lt;P&gt;Sorry I forgot, of course - Terraform plan goes through without a problem, but during the apply phase, I get&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;│ Error: cannot create secret scope: Scope with Azure KeyVault must have userAADToken defined!
│
│   with databricks_secret_scope.this,
│   on main_secret_scope_and_keyvault_acl.tf line 15, in resource "databricks_secret_scope" "this":
│   15: resource "databricks_secret_scope" "this" {
│&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 14 Nov 2024 14:22:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/creating-an-azure-keyvault-backed-secret-scope-with-terraform/m-p/98820#M39851</guid>
      <dc:creator>VicS</dc:creator>
      <dc:date>2024-11-14T14:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an Azure-Keyvault-backed secret scope with terraform</title>
      <link>https://community.databricks.com/t5/data-engineering/creating-an-azure-keyvault-backed-secret-scope-with-terraform/m-p/115501#M45101</link>
      <description>&lt;P&gt;I'm getting the same error message when trying to use the REST API as well and have tried about every combination I could think of to get the payload correct.&amp;nbsp; I have tried AAD tokens for a user account, service principal, made those accounts full owners on the Key Vault, tried different names for the AAD Token with no success.&amp;nbsp; Anyone out there, get a working solution?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;url &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;databricks_instance&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;/api/2.0/secrets/scopes/create"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;headers &lt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gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"backend_azure_keyvault"&lt;/SPAN&gt;&lt;SPAN&gt;: {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"resource_id"&lt;/SPAN&gt;&lt;SPAN&gt;: keyVaultResourceId,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"dns_name"&lt;/SPAN&gt;&lt;SPAN&gt;: keyVaultDnsName&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; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"user_aad_token"&lt;/SPAN&gt;&lt;SPAN&gt;: aadToken&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;response &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; requests.&lt;/SPAN&gt;&lt;SPAN&gt;post&lt;/SPAN&gt;&lt;SPAN&gt;(url, &lt;/SPAN&gt;&lt;SPAN&gt;headers&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;headers, &lt;/SPAN&gt;&lt;SPAN&gt;json&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;payload)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{"error_code":"INVALID_PARAMETER_VALUE","message":"Scope with Azure KeyVault must have userAADToken defined!","details":[{"@type":"type.googleapis.com/google.rpc.RequestInfo","request_id":"de4c03b9-10c1-959b-95e8-dbeabb046fa1","serving_data":""}]}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 15 Apr 2025 10:51:21 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/creating-an-azure-keyvault-backed-secret-scope-with-terraform/m-p/115501#M45101</guid>
      <dc:creator>JamesMrukHughes</dc:creator>
      <dc:date>2025-04-15T10:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an Azure-Keyvault-backed secret scope with terraform</title>
      <link>https://community.databricks.com/t5/data-engineering/creating-an-azure-keyvault-backed-secret-scope-with-terraform/m-p/115520#M45105</link>
      <description>&lt;P&gt;I am having the same issue.&lt;/P&gt;</description>
      <pubDate>Tue, 15 Apr 2025 13:37:42 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/creating-an-azure-keyvault-backed-secret-scope-with-terraform/m-p/115520#M45105</guid>
      <dc:creator>ElijahFord</dc:creator>
      <dc:date>2025-04-15T13:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: Creating an Azure-Keyvault-backed secret scope with terraform</title>
      <link>https://community.databricks.com/t5/data-engineering/creating-an-azure-keyvault-backed-secret-scope-with-terraform/m-p/119934#M45996</link>
      <description>&lt;P&gt;I am also having the same issue. I am deploying the Azure backed secrets across 3 different workspaces in my TF deployment. Strangley enough it works for 2/3 of my deployments but then I get the same error:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Scope with Azure KeyVault must have userAADToken defined!&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2025-05-22 at 4.38.22 pm.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/17043i800A4CD3E87E68BD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2025-05-22 at 4.38.22 pm.png" alt="Screenshot 2025-05-22 at 4.38.22 pm.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 06:43:10 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/creating-an-azure-keyvault-backed-secret-scope-with-terraform/m-p/119934#M45996</guid>
      <dc:creator>J-Bradlee</dc:creator>
      <dc:date>2025-05-22T06:43:10Z</dc:date>
    </item>
  </channel>
</rss>

