Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Cannot set filter_group on aws_quicksight_analysis #31903

Closed
jshort-insights opened this issue Jun 12, 2023 · 4 comments · Fixed by #31906
Closed

[Bug]: Cannot set filter_group on aws_quicksight_analysis #31903

jshort-insights opened this issue Jun 12, 2023 · 4 comments · Fixed by #31906
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/quicksight Issues and PRs that pertain to the quicksight service.
Milestone

Comments

@jshort-insights
Copy link

Terraform Core Version

1.4.5

AWS Provider Version

5.1.0

Affected Resource(s)

aws_quicksight_analysis

Expected Behavior

Filter is applied to selected visual in analysis

Actual Behavior

Terraform panic occurs

Relevant Error/Panic Output Snippet

│ Error: Plugin did not respond
│
│   with aws_quicksight_analysis.generated_weekly_sales_analysis,
│   on main.tf line 413, in resource "aws_quicksight_analysis" "generated_weekly_sales_analysis":
│  413: resource "aws_quicksight_analysis" "generated_weekly_sales_analysis" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).PlanResourceChange call. The plugin logs may contain more details.
╵

Stack trace from the terraform-provider-aws_v5.1.0_x5 plugin:

panic: invalid set element type

goroutine 407 [running]:
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Schema).ZeroValue(0x0?)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/schema.go:506 +0xf4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readSet(0xc008f67a40, {0xc0039e8b00, 0xb, 0xb}, 0xb20bda0?)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_config.go:259 +0x7d
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0xc008f67a40, {0xc0039e8b00?, 0xb, 0xb}, 0x1)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_config.go:107 +0x55b
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*nestedConfigFieldReader).ReadField(0xc00659d508?, {0xc0039e8b00?, 0xdc651d4?, 0xc003c13360?})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_config.go:327 +0x4d
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.readObjectField({0xf065dc0, 0xc008d8fb48}, {0xc003c13360, 0xa, 0x2000?}, 0x0?)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader.go:236 +0x1e4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0xc008f67a40, {0xc003c13360?, 0xa, 0xa}, 0x1)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_config.go:109 +0x465
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*nestedConfigFieldReader).ReadField(0x7f85e2df9108?, {0xc003c13360?, 0x15e06700?, 0xc002324510?})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_config.go:327 +0x4d
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.readListField({0xf065dc0, 0xc008d8fb38}, {0xc002324510?, 0x9, 0x50?})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader.go:203 +0x2f4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0xc008f67a40, {0xc002324510?, 0x9, 0x9}, 0x1)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_config.go:103 +0x212
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*nestedConfigFieldReader).ReadField(0xc00659dd40?, {0xc002324510?, 0x7f85e2df9108?, 0xc00a530500?})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_config.go:327 +0x4d
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.readObjectField({0xf065dc0, 0xc008d8fb30}, {0xc00a530500, 0x8, 0x0?}, 0x106f94dd0?)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader.go:236 +0x1e4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0xc008f67a40, {0xc00a530500?, 0x8, 0x8}, 0x1)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_config.go:109 +0x465
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*nestedConfigFieldReader).ReadField(0x7f85e2df9108?, {0xc00a530500?, 0x15e06700?, 0xc003c8ed20?})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_config.go:327 +0x4d
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.readListField({0xf065dc0, 0xc008d8fb20}, {0xc003c8ed20?, 0x7, 0x0?})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader.go:203 +0x2f4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0xc008f67a40, {0xc003c8ed20?, 0x7, 0x7}, 0x1)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_config.go:103 +0x212
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*nestedConfigFieldReader).ReadField(0xaafac6?, {0xc003c8ed20?, 0x30?, 0xc0067447e0?})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_config.go:327 +0x4d
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.readObjectField({0xf065dc0, 0xc008d8fb18}, {0xc0067447e0, 0x6, 0x7f85bb1f9fff?}, 0x430370?)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader.go:236 +0x1e4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0xc008f67a40, {0xc0067447e0?, 0x6, 0x6}, 0x1)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_config.go:109 +0x465
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*nestedConfigFieldReader).ReadField(0x7f85e2df9108?, {0xc0067447e0?, 0x15e06700?, 0xc0090794a0?})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_config.go:327 +0x4d
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.readListField({0xf065dc0, 0xc008d8fb08}, {0xc0090794a0?, 0x5, 0x400?})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader.go:203 +0x2f4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0xc008f67a40, {0xc0090794a0?, 0x5, 0x5}, 0x1)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_config.go:103 +0x212
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*nestedConfigFieldReader).ReadField(0xc00659ef60?, {0xc0090794a0?, 0xdc60df3?, 0xc006751380?})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_config.go:327 +0x4d
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.readObjectField({0xf065dc0, 0xc008d8fa08}, {0xc006751380, 0x4, 0xc0089df758?}, 0xc008fe80a0?)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader.go:236 +0x1e4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0xc008f67a40, {0xc006751380?, 0x4, 0x4}, 0x1)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_config.go:109 +0x465
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*nestedConfigFieldReader).ReadField(0x7f85e2df9108?, {0xc006751380?, 0x15e06700?, 0xc008f8f110?})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_config.go:327 +0x4d
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.readListField({0xf065dc0, 0xc008d8f9f8}, {0xc008f8f110?, 0x3, 0x0?})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader.go:203 +0x2f4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0xc008f67a40, {0xc008f8f110?, 0x3, 0x3}, 0x1)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_config.go:103 +0x212
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*nestedConfigFieldReader).ReadField(0xc00659f828?, {0xc008f8f110?, 0xdcea434?, 0xc009dad5e0?})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_config.go:327 +0x4d
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.readObjectField({0xf065dc0, 0xc008d8f4b8}, {0xc009dad5e0, 0x2, 0x30?}, 0xc0014f4ab0?)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader.go:236 +0x1e4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0xc008f67a40, {0xc009dad5e0?, 0x2, 0x2}, 0x1)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_config.go:109 +0x465
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*nestedConfigFieldReader).ReadField(0x15e06700?, {0xc009dad5e0?, 0x0?, 0xc006f72ee0?})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_config.go:327 +0x4d
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.readListField({0xf065dc0, 0xc008d8f4a8}, {0xc006f72ee0?, 0x1, 0xc008f67aa0?})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader.go:203 +0x2f4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).readField(0xc008f67a40, {0xc006f72ee0?, 0x1, 0x1}, 0x0)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_config.go:103 +0x212
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ConfigFieldReader).ReadField(0xc008f67a40?, {0xc006f72ee0?, 0x1?, 0x1?})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_config.go:29 +0xbc
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*MultiLevelFieldReader).ReadFieldExact(0xc006f72ed0?, {0xc006f72ee0, 0x1, 0x1}, {0xdc5df57, 0x6})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/field_reader_multi.go:31 +0xa8
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).get(0xc009f61080, {0xc006f72ee0, 0x1, 0x1}, 0x1?)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/resource_data.go:548 +0x145
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).getChange(0x18?, {0xdc6ec64?, 0xa?}, 0x0?, 0x67?)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/resource_data.go:524 +0x1b8
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).diffChange(0xc0065a0600?, {0xdc6ec64?, 0x11?})
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/resource_data.go:501 +0x76
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.diffList(0xf13af50?, {0xf139e40, 0xc0075a6e40}, {0xdc6ec64, 0xa}, 0xc002375900, 0xc0065a0ad8, {0xf147410?, 
0xc009f61080?}, 0x0)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/schema.go:1172 +0x90
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.diff(0x6?, {0xf139e40, 0xc0075a6e40}, {0xdc6ec64, 0xa}, 0xc002375900, 0xc009f61000, {0xf147410?, 0xc009f610
80}, 0x0)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/schema.go:1131 +0x125
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.schemaMap.Diff(0xc0014f4a50, {0xf139e40, 0xc0075a6e40}, 0xc007df5e10, 0xc008f57e90, 0xc0017081e0, {0xdc1b800, 0xc0002
8a800}, 0x0)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/schema.go:679 +0x353
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).SimpleDiff(0xf13af50?, {0xf139e40?, 0xc0075a6e40?}, 0xc007df5e10, 0xbeee7a0?, {0xdc1b800?, 0xc00028a800?}
)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/resource.go:890 +0x6c
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).PlanResourceChange(0xc001708de0, {0xf139e40?, 0xc0084efbf0?}, 0xc007015680)
        github.com/hashicorp/terraform-plugin-sdk/v2@v2.26.1/helper/schema/grpc_provider.go:741 +0x9c9
github.com/hashicorp/terraform-plugin-mux/tf5muxserver.muxServer.PlanResourceChange({0xc005a579e0, 0xc005a57a40, {0xc008d5f720, 0x2, 0x2}, {0x0, 0x0, 0x0}, {0x0, 0x0, ...}, ...
}, ...)
        github.com/hashicorp/terraform-plugin-mux@v0.10.0/tf5muxserver/mux_server_PlanResourceChange.go:56 +0x1d8
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).PlanResourceChange(0xc004325e00, {0xf139e40?, 0xc0084e2ea0?}, 0xc00a6fc850)
        github.com/hashicorp/terraform-plugin-go@v0.15.0/tfprotov5/tf5server/server.go:783 +0x574
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_PlanResourceChange_Handler({0xd9043a0?, 0xc004325e00}, {0xf139e40, 0xc0084e2ea0}, 0xc00a6fc7e0, 
0x0)
        github.com/hashicorp/terraform-plugin-go@v0.15.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:401 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc00882c3c0, {0xf14a620, 0xc0089f51e0}, 0xc005dbbc20, 0xc008e6b830, 0x15de8528, 0x0)
        google.golang.org/grpc@v1.54.0/server.go:1345 +0xdf0
google.golang.org/grpc.(*Server).handleStream(0xc00882c3c0, {0xf14a620, 0xc0089f51e0}, 0xc005dbbc20, 0x0)
        google.golang.org/grpc@v1.54.0/server.go:1722 +0xa2f
google.golang.org/grpc.(*Server).serveStreams.func1.2()
        google.golang.org/grpc@v1.54.0/server.go:966 +0x98

Error: The terraform-provider-aws_v5.1.0_x5 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

Terraform Configuration Files


resource "aws_quicksight_analysis" "generated_weekly_sales_analysis" {
  analysis_id    = "generated-weekly-sales-analysis"
  name           = "Old vs New Weekly sales Analysis"
  aws_account_id = data.aws_caller_identity.current.account_id

  definition {
    data_set_identifiers_declarations {
      data_set_arn = "arn:aws:quicksight:eu-west-1:123456789:dataset/70d3ce75-c58d-4664-a1bc-495b483d9cb7"
      identifier   = "70d3ce75-c58d-4664-a1bc-495b483d9cb7"
    }

    filter_groups {
      filter_group_id = "last-3-months-filter"
      filters {
        relative_dates_filter {
          filter_id = "filter-by-date"
          column {
            data_set_identifier = "70d3ce75-c58d-4664-a1bc-495b483d9cb7"
            column_name         = "Date"
          }
          anchor_date_configuration {
            anchor_option = "NOW"
          }
          minimum_granularity = "DAY"
          time_granularity    = "MONTH"
          relative_date_type  = "LAST"
          relative_date_value = "3"
          null_option         = "NON_NULLS_ONLY"
        }
      }

      scope_configuration {
        selected_sheets {
          sheet_visual_scoping_configurations {
            sheet_id = "weekly-profiles-sheet"
            scope    = "SELECTED_VISUALS"
            visual_ids = [
              "last-3-months-kpi"
            ]
          }
        }
      }
      status        = "ENABLED"
      cross_dataset = "SINGLE_DATASET"
    }

    sheets {
      sheet_id = "weekly-sales-sheet"
      name     = "Old V New Generated sales"

      visuals {
        kpi_visual {
          visual_id = "last-3-months-kpi"
          title {
            visibility = "VISIBLE"
            format_text {
              rich_text = "<visual-title>Difference Old  vs New sales (Last 3 Months)</visual-title>"
            }
          }
          subtitle {
            visibility = "VISIBLE"
          }
          chart_configuration {
            field_wells {
              values {
                numerical_measure_field {
                  field_id = "old-total-sales"
                  column {
                    data_set_identifier = "70d3ce75-c58d-4664-a1bc-495b483d9cb7"
                    column_name         = "Old Total Profiles"
                  }
                  aggregation_function {
                    simple_numerical_aggregation = "SUM"
                  }
                }
              }
              target_values {
                numerical_measure_field {
                  field_id = "new-total-sales"
                  column {
                    data_set_identifier = "70d3ce75-c58d-4664-a1bc-495b483d9cb7"
                    column_name         = "New Total sales"
                  }
                  aggregation_function {
                    simple_numerical_aggregation = "SUM"
                  }
                }
              }
            }
            sort_configuration {}

          }
        }
      }
      layouts {
        configuration {
          grid_layout {
            elements {
              element_id   = "last-3-months-kpi"
              element_type = "VISUAL"
              column_index = "0"
              column_span  = "32"
              row_index    = "12"
              row_span     = "4"
            }

            canvas_size_options {
              screen_canvas_size_options {
                resize_option             = "FIXED"
                optimized_view_port_width = "1600px"
              }
            }
          }
        }
      }
      content_type = "INTERACTIVE"
    }

    analysis_defaults {
      default_new_sheet_configuration {
        interactive_layout_configuration {
          grid {
            canvas_size_options {
              screen_canvas_size_options {
                resize_option             = "FIXED"
                optimized_view_port_width = "1600px"
              }
            }
          }
        }
        sheet_content_type = "INTERACTIVE"
      }
    }
  }
}

Steps to Reproduce

  1. Create quicksight analysis with a kpi visual
  2. add a relative date filter for last 3 months

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@jshort-insights jshort-insights added bug Addresses a defect in current functionality. needs-triage Waiting for first response or review from a maintainer. labels Jun 12, 2023
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added crash Results from or addresses a Terraform crash or kernel panic. service/quicksight Issues and PRs that pertain to the quicksight service. labels Jun 12, 2023
@g-dx
Copy link
Contributor

g-dx commented Jun 12, 2023

Relates To: #30453

g-dx added a commit to g-dx/terraform-provider-aws that referenced this issue Jun 12, 2023
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Jun 12, 2023
@github-actions github-actions bot added this to the v5.5.0 milestone Jun 16, 2023
ewbankkit added a commit that referenced this issue Jun 20, 2023
@github-actions
Copy link

This functionality has been released in v5.5.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. crash Results from or addresses a Terraform crash or kernel panic. service/quicksight Issues and PRs that pertain to the quicksight service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants