From 264ab37f5a3c41dec52967f6ea76174bde35b75a Mon Sep 17 00:00:00 2001 From: obs-gh-abhinavpappu <141665106+obs-gh-abhinavpappu@users.noreply.github.com> Date: Mon, 9 Sep 2024 09:33:04 -0700 Subject: [PATCH] fix: bug with encoding path for groupings (#152) --- observe/resource_monitor_v2.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/observe/resource_monitor_v2.go b/observe/resource_monitor_v2.go index f0cd3e92..9fda0814 100644 --- a/observe/resource_monitor_v2.go +++ b/observe/resource_monitor_v2.go @@ -881,7 +881,7 @@ func newMonitorV2DefinitionInput(data *schema.ResourceData) (defnInput *gql.Moni } if _, ok := data.GetOk("groupings"); ok { groupings := make([]gql.MonitorV2ColumnInput, 0) - for _, i := range data.Get("groupings").([]interface{}) { + for i := range data.Get("groupings").([]interface{}) { colInput, diags := newMonitorV2ColumnInput(fmt.Sprintf("groupings.%d.", i), data) if diags.HasError() { return nil, diags @@ -1020,7 +1020,7 @@ func newMonitorV2CountRuleInput(path string, data *schema.ResourceData) (compari // optionals if _, ok := data.GetOk(fmt.Sprintf("%scompare_groups", path)); ok { compareGroups := make([]gql.MonitorV2ColumnComparisonInput, 0) - for _, i := range data.Get(fmt.Sprintf("%scompare_groups", path)).([]interface{}) { + for i := range data.Get(fmt.Sprintf("%scompare_groups", path)).([]interface{}) { columnComparison, diags := newMonitorV2ColumnComparisonInput(fmt.Sprintf("%scompare_groups.%d.", path, i), data) if diags.HasError() { return nil, diags