-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Open
Labels
bugAddresses a defect in current functionality.Addresses a defect in current functionality.service/quicksightIssues and PRs that pertain to the quicksight service.Issues and PRs that pertain to the quicksight service.
Description
Terraform and AWS Provider Version
### Terraform Version
Terraform v1.8.x
AWS Provider v5.100+
Affected Resource(s) or Data Source(s)
- aws_quicksight_analysis
- specifically under:
visual > actions > action_operations > set_parameters_operation > value > custom_values_configuration > custom_values
Expected Behavior
custom_values_configuration {
custom_values {
string_values = ["NULL"]
}
}
Which should result a JSON of
"SetParametersOperation": {
"ParameterValueConfigurations": [
{
...
"Value": {
"CustomValuesConfiguration": {
"CustomValues": {
"StringValues": [
"NULL"
]
}
"IncludeNullValue": false
}
}
}
]
}
Actual Behavior
Generates:
"SetParametersOperation": {
"ParameterValueConfigurations": [
{
...
"Value": {
"CustomValuesConfiguration": {
"CustomValues": {
"DateTimeValues": [],
"DecimalValues": [],
"IntegerValues": [],
"StringValues": [
"NULL"
]
}
"IncludeNullValue": false
}
}
}
]
}
This causes the QuickSight API to reject the request with an error like:
ValidationException: CustomValuesConfiguration must specify only a subset of [StringValues, IntegerValues, DecimalValues, DateTimeValues].
This behavior makes it impossible to use navigation or parameter actions with a single value type via Terraform.
Relevant Error/Panic Output
ValidationException: CustomValuesConfiguration must specify only a subset of [StringValues, IntegerValues, DecimalValues, DateTimeValues].
Sample Terraform Configuration
Click to expand configuration
Steps to Reproduce
Steps to Reproduce
- Create a QuickSight analysis with a visual (e.g., table or chart)
- Add a visual action like this:
actions {
...
action_operations {
set_parameters_operation {
parameter_value_configurations {
destination_parameter_name = "MyParam"
value {
custom_values_configuration {
custom_values {
string_values = ["NULL"]
}
}
}
}
}
}
}
- Run terraform apply
- Observe the API request (e.g., via TF_LOG=debug) and the QuickSight error
Debug Logging
GenAI / LLM Assisted Development
n/a
Important Facts and References
Looking at visual_actions.go, the schema is defined as:
"string_values": {
Type: schema.TypeList,
Optional: true,
Elem: &schema.Schema{Type: schema.TypeString},
},
"decimal_values": { ... },
"integer_values": { ... },
"date_time_values": { ... },
The flatten and expand logic appears to include the other fields regardless of whether they were set in the HCL, likely due to how empty lists are handled during serialization.
Suggested Fix
The provider should:
- Check for len(list) > 0 before including the list in the request payload
- Omit unset or empty value types from CustomValues when building the request model
- Align behavior with other AWS Terraform resources that skip optional empty fields
Would you like to implement a fix?
No
Metadata
Metadata
Assignees
Labels
bugAddresses a defect in current functionality.Addresses a defect in current functionality.service/quicksightIssues and PRs that pertain to the quicksight service.Issues and PRs that pertain to the quicksight service.