Skip to content

Commit

Permalink
fix: always diff suppress rematerialization_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
obs-gh-abhinavpappu committed Dec 2, 2024
1 parent e0b8aa4 commit 20396bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions observe/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,10 @@ func diffSuppressWhenWorkspace(k, prv, nxt string, d *schema.ResourceData) bool
return prv == nxt
}

func diffSuppressAlways(k, prv, nxt string, d *schema.ResourceData) bool {
return true
}

var link = regexp.MustCompile("(^[A-Za-z])|_([A-Za-z])")

var matchFirstCap = regexp.MustCompile("(.)([A-Z][a-z]+)")
Expand Down
5 changes: 5 additions & 0 deletions observe/resource_dataset.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ func resourceDataset() *schema.Resource {
Default: "rematerialize",
ValidateDiagFunc: validateEnums(gql.AllRematerializationModes),
Description: descriptions.Get("dataset", "schema", "rematerialization_mode"),
// rematerialization_mode is a config option that only applies to the update operation
// (i.e. it's not a property of the dataset), and therefore it doesn't make sense to
// consider changes to *only* this field as a diff. It's only relevant when there are
// also changes to the OPAL.
DiffSuppressFunc: diffSuppressAlways,
},
},
}
Expand Down

0 comments on commit 20396bf

Please sign in to comment.