do not print permissions and grants

This commit is contained in:
Shreyas Goenka 2024-07-08 18:09:52 +02:00
parent 2ec5475d97
commit f544ddb7d6
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
1 changed files with 10 additions and 0 deletions

View File

@ -93,6 +93,16 @@ func (p *terraformPlan) Path() string {
func (p *terraformPlan) ActionsByTypes(query ...ActionType) []Action {
actions := make([]Action, 0)
for _, rc := range p.tfPlan.ResourceChanges {
if rc.Type == "databricks_permissions" {
// We don't need to print permissions changes.
continue
}
if rc.Type == "databricks_grants" {
// We don't need to print grants changes.
continue
}
tfActions := rc.Change.Actions
switch {
case slices.Contains(query, ActionTypeDelete) && tfActions.Delete():