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

fix: Fix views permadiff #3079

Merged
merged 7 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename
  • Loading branch information
sfc-gh-jmichalak committed Sep 16, 2024
commit 6bfcef35b8ae54080fb97a7ff15c9c53a1cd13c6
2 changes: 1 addition & 1 deletion pkg/resources/diff_suppressions.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func suppressIdentifierQuoting(_, oldValue, newValue string, _ *schema.ResourceD
return slices.Equal(oldId, newId)
}

func ignoreEmpty(k, oldValue, newValue string, _ *schema.ResourceData) bool {
func ignoreEmptyList(k, oldValue, newValue string, _ *schema.ResourceData) bool {
if strings.HasSuffix(k, ".#") && newValue == "0" {
return true
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/resources/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ var viewSchema = map[string]*schema.Schema{
},
},
Description: "If you want to change the name of a column or add a comment to a column in the new view, include a column list that specifies the column names and (if needed) comments about the columns. You do not need to specify the data types of the columns. If this field is not specified, columns are inferred from the `statement` field by Snowflake.",
DiffSuppressFunc: ignoreEmpty,
DiffSuppressFunc: ignoreEmptyList,
},
"comment": {
Type: schema.TypeString,
Expand Down
Loading