You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix incorrect SetSuppressDiff() for workload_size in databricks_model_serving (#5152)
## Changes
This PR removes the `SetSuppressDiff()` calls for `workload_size` that
were added in #5111 (commit 1617350).
The previous PR (#5111) made a faulty assumption that `workload_size`
would be returned by the API when
`min_provisioned_concurrency`/`max_provisioned_concurrency` were
specified. As a result, it added `SetSuppressDiff()` to prevent
Terraform from detecting changes.
However, the API actually does **not** return `workload_size` when
`min_provisioned_concurrency`/`max_provisioned_concurrency` are set.
This means that no diff suppression is needed, and these fields can be
simply treated as optional (which is the default behavior).
## Tests
- [x] Manual test: Verify that switching between `workload_size` and
`min_provisioned_concurrency`/`max_provisioned_concurrency` works
correctly without unexpected diffs
When adding the concurrency parameters and removing workload size:
```
Terraform will perform the following actions:
# databricks_model_serving.llama_endpoint will be updated in-place
~ resource "databricks_model_serving" "llama_endpoint" {
id = "llama-3-2-1b-instruct-endpoint"
name = "llama-3-2-1b-instruct-endpoint"
# (3 unchanged attributes hidden)
~ config {
~ served_entities {
~ max_provisioned_concurrency = 0 -> 4
name = "llama_v3_2_1b_instruct-2"
- workload_size = "Small" -> null
# (10 unchanged attributes hidden)
}
# (1 unchanged block hidden)
}
}
```
And vice-versa:
```
# databricks_model_serving.llama_endpoint will be updated in-place
~ resource "databricks_model_serving" "llama_endpoint" {
id = "llama-3-2-1b-instruct-endpoint"
name = "llama-3-2-1b-instruct-endpoint"
# (3 unchanged attributes hidden)
~ config {
~ served_entities {
- max_provisioned_concurrency = 4 -> null
name = "llama_v3_2_1b_instruct-2"
+ workload_size = "Small"
# (10 unchanged attributes hidden)
}
# (1 unchanged block hidden)
}
```
The applies complete without error, and the plan is empty after apply.
## Related
- Previous PR: #5111
- Previous commit:
1617350
---------
Co-authored-by: Alex Ott <[email protected]>
Copy file name to clipboardExpand all lines: NEXT_CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,8 @@
10
10
11
11
### Bug Fixes
12
12
13
+
* Remove unnecessary `SetSuppressDiff()` for `workload_size` in `databricks_model_serving` ([#5152](https://github.com/databricks/terraform-provider-databricks/pull/5152)).
0 commit comments