Skip to content

Commit

Permalink
fix: bug with encoding path for groupings (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
obs-gh-abhinavpappu authored Sep 9, 2024
1 parent 386d685 commit 264ab37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions observe/resource_monitor_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 264ab37

Please sign in to comment.