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 visible_range of bar_chart_visual in a quicksight analysis #32347

Closed
jshort-insights opened this issue Jul 3, 2023 · 6 comments · Fixed by #32464
Closed
Labels
bug Addresses a defect in current functionality. service/quicksight Issues and PRs that pertain to the quicksight service.
Milestone

Comments

@jshort-insights
Copy link

jshort-insights commented Jul 3, 2023

Terraform Core Version

1.5.2

AWS Provider Version

5.5.0

Affected Resource(s)

aws_quicksight_analysis

Expected Behavior

Setting the scrollbar options of a bar chart visual to a percentage range of 0-100 to be honoured in the analysis

Actual Behavior

An exception is thrown when creating the analysis

Relevant Error/Panic Output Snippet

╷
│ Error: setting definition: Invalid address to set: []string{"definition", "0", "sheets", "0", "visuals", "0", "bar_chart_visual", "0", "chart_configuration", "0", "category_axis", "0", "scrollbar_options", "0", "visibile_range"}
│

Terraform Configuration Files

resource "aws_quicksight_analysis" "example_download_analysis" {
  analysis_id    = "example-distribution-analysis"
  name           = "Example Analysis"
  aws_account_id = var.account_id

  definition {
    data_set_identifiers_declarations {
      data_set_arn = var.dataset_arn
      identifier   = var.dataset_id
    }

    sheets {
      sheet_id = "example-sheet"
      name     = "Example"

      visuals {
        bar_chart_visual {
          visual_id = "failed-download-bar-chart"
          title {
            visibility = "VISIBLE"
            format_text {
              rich_text = "<visual-title>Failed Download HTTP Statuses</visual-title>"
            }
          }
          subtitle {
            visibility = "VISIBLE"
          }
          chart_configuration {
            field_wells {
              bar_chart_aggregated_field_wells {
                category {
                  date_dimension_field {
                    field_id = "failed-download-time-field"
                    column {
                      data_set_identifier = var.dataset_id
                      column_name         = "time"
                    }
                    hierarchy_id = "failed-download-time-field"
                  }
                }
                colors {
                  categorical_dimension_field {
                    field_id = "failed-download-status-field"
                    column {
                      data_set_identifier = var.dataset_id
                      column_name         = "http_status"
                    }
                  }
                }
              }
            }
            sort_configuration {
              category_sort {
                field_sort {
                  field_id  = "failed-download-time-field"
                  direction = "ASC"
                }
              }
              category_items_limit {
                items_limit      = 5
                other_categories = "INCLUDE"
              }
              color_items_limit {
                items_limit      = 5
                other_categories = "INCLUDE"
              }
              small_multiples_limit_configuration {
                other_categories = "INCLUDE"
                items_limit      = 1
              }
            }
            orientation      = "VERTICAL"
            bars_arrangement = "CLUSTERED"
            category_axis {
              scrollbar_options {
                visible_range {
                  percent_range {
                    from = 0
                    to = 100
                  }
                }
              }
            }
            color_label_options {
              sort_icon_visibility = "VISIBLE"
            }
            legend {
              width = "108px"
            }
            data_labels {
              visibility = "HIDDEN"
              overlap    = "DISABLE_OVERLAP"
            }
            tooltip {
              tooltip_visibility    = "VISIBLE"
              selected_tooltip_type = "BASIC"
              field_base_tooltip {
                aggregation_visibility = "HIDDEN"
                tooltip_title_type     = "PRIMARY_VALUE"
                tooltip_fields {
                  field_tooltip_item {
                    field_id   = "failed-download-time-field"
                    visibility = "VISIBLE"
                  }
                }
                tooltip_fields {
                  field_tooltip_item {
                    field_id   = "failed-download-status-field"
                    visibility = "VISIBLE"
                  }
                }
              }
            }
          }
          column_hierarchies {
            date_time_hierarchy {
              hierarchy_id = "failed-download-time-field"
            }
          }
        }
      }

      layouts {
        configuration {
          grid_layout {
            elements {
              element_id   = "failed-download-bar-chart"
              element_type = "VISUAL"
              column_index = 0
              column_span  = 13
              row_index    = 0
              row_span     = 12
            }
            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"
      }
    }
  }

  permissions {
    principal = var.quicksight_data_group
    actions = [
      "quicksight:DeleteAnalysis",
      "quicksight:DescribeAnalysis",
      "quicksight:DescribeAnalysisPermissions",
      "quicksight:QueryAnalysis",
      "quicksight:RestoreAnalysis",
      "quicksight:UpdateAnalysis",
      "quicksight:UpdateAnalysisPermissions",
    ]
  }
}

Steps to Reproduce

Create a bar chart visual in a quicksight analysis and apply changes to AWS

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 Jul 3, 2023
@github-actions
Copy link

github-actions bot commented Jul 3, 2023

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 the service/quicksight Issues and PRs that pertain to the quicksight service. label Jul 3, 2023
@justinretzolk
Copy link
Member

Hey @jshort-insights 👋 Thank you for taking the time to raise this! I noticed in the error that you pasted, that visible_range was misspelled as visibile_range, though that does not appear to be the case in the sample Terraform configuration that you provided. Did correcting this typo have any effect on the behavior?

If possible, it may be beneficial for us to review debug logging. Are you able to provide that (redacted as needed)?

@justinretzolk justinretzolk added waiting-response Maintainers are waiting on response from community or contributor. and removed needs-triage Waiting for first response or review from a maintainer. labels Jul 6, 2023
@github-actions github-actions bot removed the waiting-response Maintainers are waiting on response from community or contributor. label Jul 6, 2023
@jshort-insights
Copy link
Author

@justinretzolk I believe this the exact cause of the issue a typo in the mapping

tfMap["visibile_range"] = flattenVisibleRangeOptions(apiObject.VisibleRange)

@justinretzolk
Copy link
Member

Hey @jshort-insights 👋 Thank you for taking the time to take a look into that; that definitely seems like a likely culprit.

Relates #31923

@github-actions
Copy link

This functionality has been released in v5.8.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 Aug 13, 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. service/quicksight Issues and PRs that pertain to the quicksight service.
Projects
None yet
2 participants