hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.74k stars 9.1k forks source link

[Bug]: ArcThicknessOptions enum is missing ArcThicknessOptionsWhole = "WHOLE" value #36978

Open EloiElc opened 4 months ago

EloiElc commented 4 months ago

Terraform Core Version

1.8.0

AWS Provider Version

5.4.5

Affected Resource(s)

aws_quicksight_analysis aws_quicksight_dashboard

Expected Behavior

To be able to set arc_thickness for PieChart to "WHOLE" value.

Actual Behavior

Unable to set arc_thickness for PieChart to "WHOLE" value.

Relevant Error/Panic Output Snippet

│ Error: expected definition.0.sheets.0.visuals.16.pie_chart_visual.0.chart_configuration.0.donut_options.0.arc_options.0.arc_thickness to be one of ["SMALL" "MEDIUM" "LARGE"], got WHOLE

Terraform Configuration Files

  visuals {
    pie_chart_visual {
      visual_id = "143a6bb1-51b0-46e4-bb7d-fcaad4f4d99e"
      chart_configuration {
        category_label_options {
          sort_icon_visibility = "HIDDEN"
          visibility           = "HIDDEN"
        }
        data_labels {
          category_label_visibility = "VISIBLE"
          label_color               = null
          label_content             = null
          measure_label_visibility  = "VISIBLE"
          overlap                   = "DISABLE_OVERLAP"
          position                  = null
          visibility                = "VISIBLE"
        }
        donut_options {
          arc_options {
            arc_thickness = "WHOLE"
          }
        }

Steps to Reproduce

Set arc_thickness to "WHOLE" value.

Debug Output

No response

Panic Output

No response

Important Factoids

arc_thickness value determines whether the chart is a pie chart or a donut chart. arc_thickness = "WHOLE" determines that the chart is a pie chart.

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 4 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

acwwat commented 4 months ago

AWS Go SDK v2 seems to have two very similar enums, ArcThickness and ArcThicknessOptions. The former has four values including WHOLE, and the latter has only three. Going by the API documentation, it seems that pie chart would use the former and gauge chart would use the latter. In the resource code, both are using the ArcThicknessOptions enum, so at least the pie chart schema would need to be fixed.

I'll see if I can confirm the exact spec on the SDK side and adjust the provider code appropriately.