<?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 Databricks workspace creation using Terraform and storage configuration IAM Role Arn in Administration &amp; Architecture</title>
    <link>https://community.databricks.com/t5/administration-architecture/databricks-workspace-creation-using-terraform-and-storage/m-p/62492#M942</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;When creating a new AWS Databricks workspace in account console manually, it appears that IAM Role ARN is mandatory parameter when configuring a Storage Configuration&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sampo_1-1709404789587.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/6480i6B4B808A96E4053B/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="sampo_1-1709404789587.png" alt="sampo_1-1709404789587.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However in the Terraform &lt;A href="https://registry.terraform.io/providers/databricks/databricks/1.37.1/docs/resources/mws_storage_configurations" target="_self"&gt;databricks_mws_storage_configurations&lt;/A&gt; resource there is apparently no way to set the IAM Role arn.&lt;/P&gt;&lt;P&gt;This then leads to failure when creating workspace using &lt;A href="https://registry.terraform.io/providers/databricks/databricks/1.37.1/docs/resources/mws_workspaces" target="_self"&gt;databricks_mws_workspaces&lt;/A&gt; resource&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sampo_3-1709405245369.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/6482i792B42A2A12BB206/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="sampo_3-1709405245369.png" alt="sampo_3-1709405245369.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Has anyone else seen this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 02 Mar 2024 18:56:23 GMT</pubDate>
    <dc:creator>sampo</dc:creator>
    <dc:date>2024-03-02T18:56:23Z</dc:date>
    <item>
      <title>Databricks workspace creation using Terraform and storage configuration IAM Role Arn</title>
      <link>https://community.databricks.com/t5/administration-architecture/databricks-workspace-creation-using-terraform-and-storage/m-p/62492#M942</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;When creating a new AWS Databricks workspace in account console manually, it appears that IAM Role ARN is mandatory parameter when configuring a Storage Configuration&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sampo_1-1709404789587.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/6480i6B4B808A96E4053B/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="sampo_1-1709404789587.png" alt="sampo_1-1709404789587.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However in the Terraform &lt;A href="https://registry.terraform.io/providers/databricks/databricks/1.37.1/docs/resources/mws_storage_configurations" target="_self"&gt;databricks_mws_storage_configurations&lt;/A&gt; resource there is apparently no way to set the IAM Role arn.&lt;/P&gt;&lt;P&gt;This then leads to failure when creating workspace using &lt;A href="https://registry.terraform.io/providers/databricks/databricks/1.37.1/docs/resources/mws_workspaces" target="_self"&gt;databricks_mws_workspaces&lt;/A&gt; resource&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sampo_3-1709405245369.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/6482i792B42A2A12BB206/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="sampo_3-1709405245369.png" alt="sampo_3-1709405245369.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Has anyone else seen this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Mar 2024 18:56:23 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/databricks-workspace-creation-using-terraform-and-storage/m-p/62492#M942</guid>
      <dc:creator>sampo</dc:creator>
      <dc:date>2024-03-02T18:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: Databricks workspace creation using Terraform and storage configuration IAM Role Arn</title>
      <link>https://community.databricks.com/t5/administration-architecture/databricks-workspace-creation-using-terraform-and-storage/m-p/62626#M945</link>
      <description>&lt;P&gt;Investigated this further... Terraform code to create the workspace&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;resource "databricks_mws_workspaces" "databricks_ws" {
  provider = databricks.mws
  account_id = var.databricks_account_id
  aws_region = var.region
  workspace_name = "databricks-workspace-${local.env}"

  credentials_id = databricks_mws_credentials.databricks_credential_conf.id
  storage_configuration_id = databricks_mws_storage_configurations.databricks_storage_conf.id
  network_id = databricks_mws_networks.databricks_network_conf.id

  token {
    comment = "Terraform"
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the Terraform log it looks like account_id string is added to credentials_id, network_id, and storage_configuration_id values&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;POST /api/2.0/accounts/&amp;lt;account_id&amp;gt;/workspaces
{
  "account_id": "&amp;lt;account_id&amp;gt;",
  "aws_region": "eu-west-1",
  "credentials_id": "&amp;lt;account_id&amp;gt;/bbf46eba-67e2-4538-8d19-426e75136ead",
  "is_no_public_ip_enabled": true,
  "network_id": "&amp;lt;account_id&amp;gt;/e9d9fb8a-3b9d-4ea3-8823-72c62e7c8f6d",
  "storage_configuration_id": "&amp;lt;account_id&amp;gt;/06bfb24a-4426-4343-b474-6fe593e20746",
  "workspace_name": "databricks-workspace-test"
}
&amp;lt; HTTP/2.0 400 Bad Request&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Looking at the Rest API sample for &lt;A href="https://docs.databricks.com/api/account/workspaces/create" target="_self"&gt;new workspace creation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sampo_0-1709624314099.png" style="width: 421px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/6501i238B77AFB10927E1/image-dimensions/421x217/is-moderation-mode/true?v=v2" width="421" height="217" role="button" title="sampo_0-1709624314099.png" alt="sampo_0-1709624314099.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;There is no account_id in the credentials_id, network_id, and storage_configuration_id values&lt;/P&gt;&lt;P&gt;I replaced account_id string with empty string in the Terraform code and now workspace creation works without any errors&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;resource "databricks_mws_workspaces" "databricks_ws" {
  provider = databricks.mws
  account_id = var.databricks_account_id
  aws_region = var.region
  workspace_name = "databricks-workspace-${local.env}"

  credentials_id = replace(databricks_mws_credentials.databricks_credential_conf.id, "${var.databricks_account_id}/", "")
  storage_configuration_id = replace(databricks_mws_storage_configurations.databricks_storage_conf.id, "${var.databricks_account_id}/", "")
  network_id = replace(databricks_mws_networks.databricks_network_conf.id, "${var.databricks_account_id}/", "")
  
  token {
    comment = "Terraform"
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 07:44:15 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/databricks-workspace-creation-using-terraform-and-storage/m-p/62626#M945</guid>
      <dc:creator>sampo</dc:creator>
      <dc:date>2024-03-05T07:44:15Z</dc:date>
    </item>
  </channel>
</rss>

