Skip to content

Commit

Permalink
fix: decrease go version to work with goreleaser (#75)
Browse files Browse the repository at this point in the history
* fix: decrease go version to work with goreleaser

* fix: remove marshal attempt of a string
  • Loading branch information
kim-cloudconformity authored Feb 6, 2024
1 parent 438b81a commit 35dadcb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions conformity/resource_conformity_custom_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,13 @@ func flattenConditions(conditionsIn []cloudconformity.CustomRuleCondition) []int
m["fact"] = conditions.Fact
m["operator"] = conditions.Operator
m["path"] = conditions.Path
conditionsValueByte, _ := json.Marshal(conditions.Value)
m["value"] = string(conditionsValueByte)

value := conditions.Value
if _, ok := value.(string); !ok {
conditionsValueByte, _ := json.Marshal(conditions.Value)
value = string(conditionsValueByte)
}
m["value"] = value
conditionsOut[i] = m
}
return conditionsOut
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/trendmicro/terraform-provider-conformity

go 1.18
go 1.17

require (
github.com/hashicorp/terraform-plugin-sdk/v2 v2.16.0
Expand Down

0 comments on commit 35dadcb

Please sign in to comment.