<?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 Destroy not able to prune Databricks Provisioned GKE Cluster on GCP in Administration &amp; Architecture</title>
    <link>https://community.databricks.com/t5/administration-architecture/terraform-destroy-not-able-to-prune-databricks-provisioned-gke/m-p/96689#M2192</link>
    <description>&lt;P&gt;Ha, that's true, too. I forget how long it takes things to delete, but I've run into it many time.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Best of luck to you!&lt;/P&gt;</description>
    <pubDate>Tue, 29 Oct 2024 17:25:20 GMT</pubDate>
    <dc:creator>HaggMan</dc:creator>
    <dc:date>2024-10-29T17:25:20Z</dc:date>
    <item>
      <title>Terraform Destroy not able to prune Databricks Provisioned GKE Cluster on GCP</title>
      <link>https://community.databricks.com/t5/administration-architecture/terraform-destroy-not-able-to-prune-databricks-provisioned-gke/m-p/96673#M2186</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;newbie here in Databricks on GCP. I provisioned my Databricks workspace with Terraform and all worked well. Now when I would like to target destroy my workspace, issues occur:&lt;/P&gt;&lt;P&gt;When I do terraform destroy -target module.workspace, the workspace and all things related in Databricks (e.g. metastore assignment, vpc network assignment) are successfully pruned, except for the underlying GKE cluster, GCS buckets that Databricks provisioned when creating the workspace.&lt;/P&gt;&lt;P&gt;Therefore when I would like to destroy the VPC networking resources with another target destroy, it gives out an error&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Error when reading or editing Subnetwork: googleapi: Error 400: The subnetwork resource 'projects/data-platform-437607/regions/europe-west1/subnetworks/production-subnet' is already being used by 'projects/data-platform-437607/zones/europe-west1-b/instances/gke-db-4319326960483-system-pool-2024-f207051a-671q', resourceInUseByAnotherResource&lt;/LI-CODE&gt;&lt;P&gt;This error is expected because the GCP resources are still there, but nowhere in my Terraform config had I created these resources seperately (bc they are automatically provisioned by Databricks during workspace creation).&lt;/P&gt;&lt;P&gt;My question is: is it possible to destroy these remaining Databricks provisioned GCP resources in Terraform or manual deletion is the only way to go? Thank you very much!&lt;/P&gt;&lt;P&gt;Attached is my Terraform config for workspace:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;resource "databricks_mws_workspaces" "this" {
  provider       = databricks.acc
  account_id     = var.databricks_account_id
  workspace_name = var.databricks_workspace_name
  location       = var.google_compute_subnet_region
  cloud_resource_container {
    gcp {
      project_id = var.google_project
    }
  }

  network_id = var.databricks_mws_network_id
  gke_config {
    connectivity_type = "PRIVATE_NODE_PUBLIC_MASTER"
    master_ip_range   = var.gke_master_ip_range
  }

  token {
    comment = "Terraform provisioned workspace ${var.dbx_env}"
  }

  # this makes sure that the NAT is created for outbound traffic before creating the workspace
  depends_on = [var.google_compute_router_nat]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;#GCP #Terraform #Databricks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 15:52:42 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/terraform-destroy-not-able-to-prune-databricks-provisioned-gke/m-p/96673#M2186</guid>
      <dc:creator>KLin</dc:creator>
      <dc:date>2024-10-29T15:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: Terraform Destroy not able to prune Databricks Provisioned GKE Cluster on GCP</title>
      <link>https://community.databricks.com/t5/administration-architecture/terraform-destroy-not-able-to-prune-databricks-provisioned-gke/m-p/96676#M2187</link>
      <description>&lt;P&gt;I would guess that at this point, you will have to destroy them manually. In the future, you might want to let your TF script create all the requisite network resources; then the script will also be able to destroy them. This is a general GKE issue and not specific to Bricks. GKE does a lot of funny things at the network level and if you don't do them first, ha.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If you look at the example in the provider here:&amp;nbsp;&lt;A href="https://registry.terraform.io/providers/databricks/databricks/latest/docs/guides/gcp-workspace" target="_blank"&gt;https://registry.terraform.io/providers/databricks/databricks/latest/docs/guides/gcp-workspace&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I think they have an example creating the network.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 16:03:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/terraform-destroy-not-able-to-prune-databricks-provisioned-gke/m-p/96676#M2187</guid>
      <dc:creator>HaggMan</dc:creator>
      <dc:date>2024-10-29T16:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Terraform Destroy not able to prune Databricks Provisioned GKE Cluster on GCP</title>
      <link>https://community.databricks.com/t5/administration-architecture/terraform-destroy-not-able-to-prune-databricks-provisioned-gke/m-p/96686#M2190</link>
      <description>&lt;P&gt;Turns out it takes some time for the underlying GKE clusters to be deleted...The lesson here is that one should wait around 10 minutes between the 2 Terraform target destroys.&lt;/P&gt;&lt;P&gt;Thanks for the timely reply regardless &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 17:04:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/terraform-destroy-not-able-to-prune-databricks-provisioned-gke/m-p/96686#M2190</guid>
      <dc:creator>KLin</dc:creator>
      <dc:date>2024-10-29T17:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Terraform Destroy not able to prune Databricks Provisioned GKE Cluster on GCP</title>
      <link>https://community.databricks.com/t5/administration-architecture/terraform-destroy-not-able-to-prune-databricks-provisioned-gke/m-p/96689#M2192</link>
      <description>&lt;P&gt;Ha, that's true, too. I forget how long it takes things to delete, but I've run into it many time.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Best of luck to you!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 17:25:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/administration-architecture/terraform-destroy-not-able-to-prune-databricks-provisioned-gke/m-p/96689#M2192</guid>
      <dc:creator>HaggMan</dc:creator>
      <dc:date>2024-10-29T17:25:20Z</dc:date>
    </item>
  </channel>
</rss>

