Skip to content

Commit

Permalink
Fix Ignored Region extraSettings updating bug (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamWang-TrendMicro authored Aug 3, 2023
1 parent 3ab0f9a commit ce146b6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions conformity/account_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@ func processRuleExtraSettings(es []interface{}) []cloudconformity.RuleSettingExt
case "ignored-regions":

extraSetting[i].Values = expandStringList(item["regions"].(*schema.Set).List())
ignoredRegions := true
extraSetting[i].IgnoredRegions = &ignoredRegions

case "tags":

Expand Down
15 changes: 8 additions & 7 deletions pkg/cloudconformity/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,14 @@ type RuleSettingMultipleObject struct {
} `json:"value,omitempty"`
}
type RuleSettingExtra struct {
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
Regions *bool `json:"regions,omitempty"`
ValueKeys *[]string `json:"valueKeys,omitempty"`
Value interface{} `json:"value,omitempty"`
Values interface{} `json:"values,omitempty"`
Mappings interface{} `json:"mappings,omitempty"`
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
Regions *bool `json:"regions,omitempty"`
IgnoredRegions *bool `json:"ignoredRegions,omitempty"`
ValueKeys *[]string `json:"valueKeys,omitempty"`
Value interface{} `json:"value,omitempty"`
Values interface{} `json:"values,omitempty"`
Mappings interface{} `json:"mappings,omitempty"`
}

type RuleSetting struct {
Expand Down

0 comments on commit ce146b6

Please sign in to comment.