Skip to content

Conversation

@alexott
Copy link
Contributor

@alexott alexott commented Oct 23, 2025

Changes

Implemented a new Terraform Plugin Framework resource to manage directories in Unity Catalog volumes using the Files API.

Key changes:

  • Added resource_volume_directory.go with full CRUD implementation
    • Uses Files API CreateDirectory, GetDirectoryMetadata, and DeleteDirectory
    • directory_path attribute with RequiresReplace() plan modifier
    • Automatic parent directory creation (like mkdir -p)
    • Import support for existing directories
  • Added comprehensive unit tests for schema, metadata, and configuration
  • Added acceptance tests for basic, nested, and multiple directory scenarios
  • Registered resource in pluginfw_rollout_utils.go
  • Added complete documentation with usage examples

Technical details:

  • Built with Terraform Plugin Framework (not legacy SDK v2)
  • Idempotent operations using Databricks Go SDK
  • Proper error handling with apierr.IsMissing()
  • All unit tests passing with zero linter errors

Resolves #4055

Tests

  • make test run locally
  • relevant change in docs/ folder
  • covered with integration tests in internal/acceptance
  • using Go SDK
  • using TF Plugin Framework
  • has entry in NEXT_CHANGELOG.md file

Implemented a new Terraform Plugin Framework resource to manage directories in Unity Catalog volumes using the Files API.

Addresses: #4055

Key changes:
- Added resource_volume_directory.go with full CRUD implementation
  - Uses Files API CreateDirectory, GetDirectoryMetadata, and DeleteDirectory
  - directory_path attribute with RequiresReplace() plan modifier
  - Automatic parent directory creation (like mkdir -p)
  - Import support for existing directories
- Added comprehensive unit tests for schema, metadata, and configuration
- Added acceptance tests for basic, nested, and multiple directory scenarios
- Registered resource in pluginfw_rollout_utils.go
- Added complete documentation with usage examples

Technical details:
- Built with Terraform Plugin Framework (not legacy SDK v2)
- Idempotent operations using Databricks Go SDK
- Proper error handling with apierr.IsMissing()
- All unit tests passing with zero linter errors
@alexott alexott requested review from a team as code owners October 23, 2025 12:39
@alexott alexott requested review from tanmay-db and removed request for a team October 23, 2025 12:39
@alexott alexott temporarily deployed to test-trigger-is October 23, 2025 12:39 — with GitHub Actions Inactive
@alexott alexott temporarily deployed to test-trigger-is October 23, 2025 12:39 — with GitHub Actions Inactive
@github-actions
Copy link

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/terraform

Inputs:

  • PR number: 5141
  • Commit SHA: e3c10e478fda4836f529d5e8b5066de1a982bfa6

Checks will be approved automatically on success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add possibility to create directories on UC volumes

2 participants