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.72k stars 9.08k forks source link

[Bug]: QuickSight Percentile_aggregation bug #38430

Open pkcom-m-myohara opened 1 month ago

pkcom-m-myohara commented 1 month ago

Terraform Core Version

1.4.6

AWS Provider Version

5.29.0

Affected Resource(s)

Expected Behavior

can create a analysis with percentile visual

Actual Behavior

output error like below

│ Error: expected type of definition.0.sheets.5.visuals.17.bar_chart_visual.0.chart_configuration.0.field_wells.0.bar_chart_aggregated_field_wells.0.values.0.numerical_measure_field.0.aggregation_function.0.percentile_aggregation.0.percentile_value to be integer
│ 

Relevant Error/Panic Output Snippet

│ Error: expected type of definition.0.sheets.5.visuals.17.bar_chart_visual.0.chart_configuration.0.field_wells.0.bar_chart_aggregated_field_wells.0.values.0.numerical_measure_field.0.aggregation_function.0.percentile_aggregation.0.percentile_value to be integer
│ 

Terraform Configuration Files

There is no code because an error occurs when importing terraform.

Steps to Reproduce

  1. Manually create an analysis that includes percentiles
  2. When I try to import the definition with terraform import I get an error.

Debug Output

No response

Panic Output

No response

Important Factoids

The following tickets are similar to this issue: https://github.com/hashicorp/terraform-provider-aws/issues/33223

I think it would be better to fix the validate in the following code. https://github.com/hashicorp/terraform-provider-aws/blob/5f9c5488dc18eb77ceb037799fca39c132ee46cc/internal/service/quicksight/schema/template.go#L203

ValidateFunc: validation.IntBetween(0, 100)
↓
ValidateFunc: validation.FloatBetween(0, 100)

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 1 month ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue