-
Notifications
You must be signed in to change notification settings - Fork 460
[Fix] Fix metastore ID interpolation for account-level storage credential imports #4980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…mports This commit fixes the issue where importing account-level storage credentials fails with a missing metastore ID in the API call. The problem occurred because the import ID format "metastore_id|storage_credential_name" was not being parsed correctly during the read operation. Changes: - Added parseStorageCredentialId function to handle composite ID format - Modified read operation to parse and extract metastore_id from composite IDs - Added comprehensive unit tests for both account-level and workspace-level imports - Updated documentation with new import format examples Resolves: ES-1561726 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Also update documentation to clarify provider level terminology. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 task
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
nkvuong
approved these changes
Aug 28, 2025
.vscode/settings.json
Outdated
Comment on lines
13
to
14
"go.useCodeSnippetsOnFunctionSuggestWithoutType": true, | ||
"makefile.configureOnOpen": false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is unintentional change
## Changes <!-- Summary of your changes that are easy to understand --> There are new fields in Go SDK for `databricks_vector_search_index` and `databricks_model_serving` resources, so documenting them. ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [x] `make test` run locally - [ ] relevant change in `docs/` folder - [ ] covered with integration tests in `internal/acceptance` - [ ] using Go SDK - [ ] using TF Plugin Framework - [x] has entry in `NEXT_CHANGELOG.md` file Co-authored-by: Omer Lachish <[email protected]>
## Changes <!-- Summary of your changes that are easy to understand --> ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [x] `make test` run locally - [x] relevant change in `docs/` folder - [ ] covered with integration tests in `internal/acceptance` - [ ] using Go SDK - [ ] using TF Plugin Framework - [x] has entry in `NEXT_CHANGELOG.md` file
## Changes <!-- Summary of your changes that are easy to understand --> `databricks_budget` is the only resource in the `FinOps` category, so it makes sense to unify with the rest of billing-related resources NO_CHANGELOG=true ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [ ] `make test` run locally - [x] 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
## Changes <!-- Summary of your changes that are easy to understand --> ## Tests <!-- How is this tested? Please see the checklist below and also describe any other relevant 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 NO_CHANGELOG=true Co-authored-by: Omer Lachish <[email protected]>
- Resolves #4866 - Also marks `databricks_app` GA <!-- How is this tested? Please see the checklist below and also describe any other relevant tests --> - [x] `make test` run locally - [x] covered with integration tests in `internal/acceptance` - [x] using Go SDK - [x] using TF Plugin Framework - [x] has entry in `NEXT_CHANGELOG.md` file --------- Co-authored-by: Alex Ott <[email protected]> Co-authored-by: Omer Lachish <[email protected]>
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
deco-sdk-tagging bot
added a commit
that referenced
this pull request
Sep 1, 2025
## Release v1.88.0 ### New Features and Improvements * Document and handle additional Slack options in `databricks_notification_destination` ([#4933](#4933)) * Lower case `warehouse_name_contains` when comparing in `databricks_warehouses` ([#4966](#4966)) * Added `account_federation_policies` resource and data sources ([#4986](#4986)). * Added `account_setting_v2` resource and data sources ([#4986](#4986)). * Added `account_settings_metadata_v2` resource and data sources ([#4986](#4986)). * Added `apps_settings_custom_template` resource and data sources ([#4986](#4986)). * Added `entity_tag_assignment` resource and data sources ([#4986](#4986)). * Added `service_principal_federation_policies` resource and data sources ([#4986](#4986)). * Added `tag_policy` resource and data sources ([#4986](#4986)). * Added `workspace_setting_v2` resource and data sources ([#4986](#4986)). * Added `workspace_settings_metadata_v2` resource and data sources ([#4986](#4986)). ### Bug Fixes * Suppress diff for `databricks_catalog` attributes ([#4975](#4975)) * Correct which file event fields should be reset in `databricks_external_location` ([#4945](#4945)) * Fix `ExactlyOneOf` in `databricks_app` ([#4946](#4946)) * Enable update of `databricks_mws_ncc_private_endpoint_rule` resource ([#4957](#4957)) * Fix metastore ID interpolation for account-level storage credential imports ([#4980](#4980)). Storage credentials can now be imported using two formats: `<storage_credential_name>` when using a workspace-level provider, and `<metastore_id>|<storage_credential_name>` when using an account-level provider. Previously, importing storage credentials with an account-level provider would fail due to missing metastore ID in the API call. ### Documentation * Improve documentation for grant resource ([#4906](#4935)) * Document `gcp_attributes.first_on_demand` attribute in `databricks_cluster` ([#4934](#4934)) * Improve `databricks_mws_permission_assignment` documentation ([#4943](#4943)) * Update `databricks_job` example to use `environment_version` ([#4942](#4942)) * Fix broken link in docs/index.md ([#4949](#4949)) * Update existing docs to match Go SDK 0.81.0 ([#4960](#4960)) ### Exporter * Add match by name to more exported resources ([#4939](#4939)) * Improve handling of new dependencies in jobs, pipelines, model serving ([#4914](#4914)) * Add support for `databricks_budget` ([#4957](#4957)) * Correct support for `library.glob` in `databricks_pipeline` ([#4937](#4937)) * Resolve references also for map values ([#4944](#4944)) ### Internal Changes * Replaced `common.APIErrorBody` with corresponding structs in Go SDK ([#4936](#4936)) * Reimplement `databricks_group` data source to use combination of List + Get API ([#4947](#4947)) * Use databricks_sql_table Instead of databricks_table in Sharing Tests ([#4981](#4981) * Bump the Go SDK to v0.82.0 ([#4986](#4986)).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
When importing account-level storage credentials, the metastore ID was not being interpolated correctly, causing API calls to fail with malformed URLs containing double slashes (
/api/2.0/accounts/.../metastores//storage-credentials/...
). This occurred because during import, the Terraform state is empty andd.Get("metastore_id")
returned an empty string.Added a
parseStorageCredentialId()
function that handles composite IDs in the formatmetastore_id|storage_credential_name
for account-level imports, extracting the metastore ID and setting it in the state before making API calls. This maintains backward compatibility with workspace-level imports using simple credential names and includes comprehensive unit tests and updated documentation.Tests
make test
run locallydocs/
folderinternal/acceptance
NEXT_CHANGELOG.md
fileFixes: ES-1561726