Category
core-platform
Project Name
workspace-setup/terraform-examples/aws/aws-byovpc
What's the bug?
I'm using the AWS BYOVPC as a module like this:
module "byovpc" {
source = "github.com/databricks-solutions/technical-services-solutions//workspace-setup/terraform-examples/aws/aws-byovpc/tf?ref=0f25522"
databricks_account_id = ...
metastore_id = ...
prefix = ...
vpc_id = data.aws_vpc.main.id
...
}
Everything was working fine, but today I had to recreate my VPC and was bumping into the following error:
module.byovpc.databricks_mws_networks.this: Destroying...
Error: cannot delete mws networks: INVALID_STATE: Unable to delete, Network is being used by active workspace xxxxxxxxxxxxxxxx
After some debugging, I realized the issue is caused because the databricks_mws_networks is being deleted, but databricks_mws_workspaces still need it.
To fix this, you have to declare databricks_mws_networks with a create_before_destroy = true.
Fixed version:
resource "databricks_mws_networks" "this" {
// ...
lifecycle {
create_before_destroy = true
}
}
How to reproduce?
No response
Environment
No response
Checklist
Category
core-platform
Project Name
workspace-setup/terraform-examples/aws/aws-byovpc
What's the bug?
I'm using the AWS BYOVPC as a module like this:
Everything was working fine, but today I had to recreate my VPC and was bumping into the following error:
After some debugging, I realized the issue is caused because the
databricks_mws_networksis being deleted, butdatabricks_mws_workspacesstill need it.To fix this, you have to declare
databricks_mws_networkswith acreate_before_destroy = true.Fixed version:
How to reproduce?
No response
Environment
No response
Checklist