Skip to content

Commit

Permalink
Fix bug of processing Rule ExtraSettings values property (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamWang-TrendMicro authored Jul 18, 2023
1 parent bdee0b7 commit 3984941
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions conformity/account_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ package conformity

import (
"fmt"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/trendmicro/terraform-provider-conformity/pkg/cloudconformity"
"reflect"
"strings"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
"github.com/trendmicro/terraform-provider-conformity/pkg/cloudconformity"
)

func flattenAccountSettings(settings *cloudconformity.AccountSettings, rule []cloudconformity.GetRuleSettings) []interface{} {
Expand Down Expand Up @@ -118,7 +119,7 @@ func flattenExtraSettings(extra []*cloudconformity.RuleSettingExtra) []interface

values := v.Values.([]interface{})
switch v.Type {
case "regions":
case "regions", "ignored-regions":

e["regions"] = expandStringList(values)

Expand Down
3 changes: 2 additions & 1 deletion conformity/resource_conformity_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package conformity
import (
"context"
"fmt"
"github.com/trendmicro/terraform-provider-conformity/pkg/cloudconformity"
"sort"

"github.com/trendmicro/terraform-provider-conformity/pkg/cloudconformity"

"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/customdiff"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
Expand Down

0 comments on commit 3984941

Please sign in to comment.