@@ -104,7 +104,7 @@ func resourceSumologicCSEChainRuleRead(d *schema.ResourceData, meta interface{})
104104 d .Set ("description" , CSEChainRuleGet .Description )
105105 d .Set ("enabled" , CSEChainRuleGet .Enabled )
106106 d .Set ("entity_selectors" , entitySelectorArrayToResource (CSEChainRuleGet .EntitySelectors ))
107- d .Set ("expressions_and_limits" , CSEChainRuleGet .ExpressionsAndLimits )
107+ d .Set ("expressions_and_limits" , expressionsAndLimitsArrayToResource ( CSEChainRuleGet .ExpressionsAndLimits ) )
108108 d .Set ("group_by_fields" , CSEChainRuleGet .GroupByFields )
109109 d .Set ("is_prototype" , CSEChainRuleGet .IsPrototype )
110110 d .Set ("ordered" , CSEChainRuleGet .Ordered )
@@ -179,6 +179,19 @@ func resourceToExpressionsAndLimitsArray(resourceExpressionsAndLimits []interfac
179179 return result
180180}
181181
182+ func expressionsAndLimitsArrayToResource (expressionsAndLimits []ExpressionAndLimit ) []map [string ]interface {} {
183+ result := make ([]map [string ]interface {}, len (expressionsAndLimits ))
184+
185+ for i , expressionAndLimit := range expressionsAndLimits {
186+ result [i ] = map [string ]interface {}{
187+ "expression" : expressionAndLimit .Expression ,
188+ "limit" : expressionAndLimit .Limit ,
189+ }
190+ }
191+
192+ return result
193+ }
194+
182195func resourceToCSEChainRule (d * schema.ResourceData ) (CSEChainRule , error ) {
183196 id := d .Id ()
184197 if id == "" {
0 commit comments