Skip to content

Commit

Permalink
[Fix] Add suppress diff for azure_attributes.spot_bid_max_price in …
Browse files Browse the repository at this point in the history
…`databricks_instance_pool` (#3970)

## Changes
<!-- Summary of your changes that are easy to understand -->

Resolves #3969

## 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`
- [ ] relevant acceptance tests are passing
- [ ] using Go SDK
  • Loading branch information
alexott authored Aug 31, 2024
1 parent f4687d6 commit 6678e1e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pools/resource_instance_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ func ResourceInstancePool() common.Resource {
clusters.AzureAvailabilityOnDemand,
}, false)
}
if v, err := common.SchemaPath(s, "azure_attributes", "spot_bid_max_price"); err == nil {
v.DiffSuppressFunc = func(k, oldValue, newValue string, d *schema.ResourceData) bool {
return oldValue != "0" && newValue == "0"
}
}
if v, err := common.SchemaPath(s, "gcp_attributes", "gcp_availability"); err == nil {
v.Default = clusters.GcpAvailabilityOnDemand
v.ValidateFunc = validation.StringInSlice([]string{
Expand Down

0 comments on commit 6678e1e

Please sign in to comment.