Skip to content
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

Clarify SchemaDiffSuppressFunc description #479

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions helper/schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,12 @@ const (
SchemaConfigModeBlock
)

// SchemaDiffSuppressFunc is a function which can be used to determine
// whether a detected diff on a schema element is "valid" or not, and
// suppress it from the plan if necessary.
// SchemaDiffSuppressFunc is a function which can be used to analyze the diff
// between the value of remote resource and stored state to suppress update of
// schema element from the plan if necessary.
//
// Return true if the diff should be suppressed, false to retain it.
type SchemaDiffSuppressFunc func(k, oldValue, newValue string, d *ResourceData) bool
type SchemaDiffSuppressFunc func(k, remote, state string, d *ResourceData) bool

// SchemaDefaultFunc is a function called to return a default value for
// a field.
Expand Down