Skip to content

Commit

Permalink
fix: DiffSuppressFunc
Browse files Browse the repository at this point in the history
csquire committed Dec 12, 2024
1 parent 1464f2f commit dcb5c9b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pkg/sdkv2/resources/environment.go
Original file line number Diff line number Diff line change
@@ -56,11 +56,14 @@ func ResourceEnvironment() *schema.Resource {
Default: "latest",
Description: "Version number of dbt to use in this environment. It needs to be in the format `major.minor.0-latest` (e.g. `1.5.0-latest`), `major.minor.0-pre`, `versionless`, or `latest`. While `versionless` is still supported, using `latest` is recommended. Defaults to `latest` if no version is provided",
DiffSuppressFunc: func(k, oldValue, newValue string, d *schema.ResourceData) bool {
if (oldValue == "latest" || oldValue == "versionless") &&
(newValue == "latest" || newValue == "versionless") {
return true
switch oldValue {
case "versionless":
return newValue == "latest"
case "latest":
return newValue == "versionless"
default:
return false
}
return false
},
},
"type": {

0 comments on commit dcb5c9b

Please sign in to comment.