Skip to content

[Fix] Support updating all attributes of databricks_model_serving #4575

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
merged 9 commits into from
May 15, 2025

Conversation

mgyucht
Copy link
Contributor

@mgyucht mgyucht commented Mar 12, 2025

Changes

Currently, it is only possible to update the config for databricks_model_serving resources. The Serving Endpoints API exposes separate APIs for updating different elements of serving endpoints, including the config, tags, rate limits, and AI gateway configuration. Because of this, we need to call each API separately when requested by a user.

This PR adds support for updating these attributes. The provider will use ResourceData's HasChanges() method to determine whether each corresponding update method needs to be called.

From what I can tell, it is not possible to update the route-optimized setting for model serving endpoints, so I've marked it as ForceNew to ensure endpoints are recreated appropriately if a user requests to enable or disable route optimization.

Resolves #4564, Resolves #4038, Resolves #4589

Tests

  • Added tags to the TestAccModelServing test, verifying that tags can be provided at creation, and that in update tags can be removed, updated, and added.
  • Added AI gateway to the above test.
  • Added rate limits to the above test.

@mgyucht mgyucht requested review from a team as code owners March 12, 2025 14:42
@mgyucht mgyucht requested review from renaudhartert-db and removed request for a team March 12, 2025 14:42
@mgyucht mgyucht temporarily deployed to test-trigger-is March 12, 2025 14:42 — with GitHub Actions Inactive
@mgyucht mgyucht temporarily deployed to test-trigger-is March 12, 2025 14:43 — with GitHub Actions Inactive
@alexott alexott temporarily deployed to test-trigger-is April 8, 2025 11:20 — with GitHub Actions Inactive
@alexott alexott temporarily deployed to test-trigger-is April 8, 2025 11:21 — with GitHub Actions Inactive
@VOVELEE
Copy link
Contributor

VOVELEE commented Apr 22, 2025

@mgyucht, @alexott : Do you think you can merge this so eventually the bug is not there with the next release :)

@alexott alexott temporarily deployed to test-trigger-is April 25, 2025 08:21 — with GitHub Actions Inactive
@alexott alexott temporarily deployed to test-trigger-is April 25, 2025 08:22 — with GitHub Actions Inactive
@alexott alexott temporarily deployed to test-trigger-is May 15, 2025 14:30 — with GitHub Actions Inactive
@alexott alexott temporarily deployed to test-trigger-is May 15, 2025 14:30 — with GitHub Actions Inactive
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: 4575
  • Commit SHA: 0887b72b91ca630e531e8c7ea29fb0d37a050904

Checks will be approved automatically on success.

@alexott alexott enabled auto-merge May 15, 2025 14:36
@alexott alexott added this pull request to the merge queue May 15, 2025
Merged via the queue into main with commit 22682d5 May 15, 2025
12 checks passed
@alexott alexott deleted the issue-4564 branch May 15, 2025 15:47
deco-sdk-tagging bot added a commit that referenced this pull request May 19, 2025
## Release v1.80.0

### New Features and Improvements

* Add `resource_model_serving_provisioned_throughput` for creation of [model serving provisioned throughput](https://docs.databricks.com/aws/en/machine-learning/foundation-model-apis/deploy-prov-throughput-foundation-model-apis) endpoints [#4701](#4701)
* Replace DBFS with Unity Catalog resources in [index page](https://registry.terraform.io/providers/databricks/databricks/latest/docs) storage section [#4718](#4718) 

### Bug Fixes

 * Support updating all attributes for `databricks_model_serving` ([#4575](#4575)).
 * Fix reading of `external_id` for `databricks_service_principal` [#4712](#4712)

### Documentation
* Added documentation for GITHUB OIDC authentication type [#4717] (#4717)

### Exporter

 * Generate correct code for Databricks and Azure-managed service principals [#4715](#4715)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants