[Bug]: Apply fails on create or update operation for aws_quicksight_analysis
because Terraform sends empty string for some fields
#33035
Labels
bug
Addresses a defect in current functionality.
service/quicksight
Issues and PRs that pertain to the quicksight service.
Milestone
Terraform Core Version
1.5.3
AWS Provider Version
5.12.0
Affected Resource(s)
parameter_controls
block undersheets
block underdefinition
block inaws_quicksight_analysis
resourceExpected Behavior
Given the following
parameter_controls
block in the configuration file (undersheets
block underdefinition
block inaws_quicksight_analysis
):The following fields that are part of the FontConfiguration block must NOT be sent in the HTTP request:
FontColor
FontDecoration
FontStyle
Actual Behavior
Given the following
parameter_controls
block in the configuration file (undersheets
block underdefinition
block inaws_quicksight_analysis
):The following fields that are part of the FontConfiguration block are sent in the HTTP request, with an empty string as value:
FontColor
FontDecoration
FontStyle
This causes the QuickSight API to return an HTTP response with HTTP 400 status code, and the
terraform apply
to fail, because the above fields didn't satisfy the constraints.Debug outputs and error message can be found in the "Relevant Error/Panic Output Snippet" and "Debug Output" sections
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
export TF_LOG=DEBUG
aws_quicksight_analysis
resource from scratch)After the apply, you'll see debug logs showing the HTTP request body with the empty fields I mentioned in the "Actual Behavior" section.
See more in the "Debug Output" section
terraform apply
without theparameter_controls
blockparameter_controls
and runterraform apply
You'll see the same issue happens on an update operation too
Debug Output
After running
terraform
apply to create theaws_quicksight_analysis
resource from scratch, you'll see the following logs:After the
http.request.body=
there will be the body of the QuickSightCreateAnalysis
API call.Here's the relevant snippet:
As you can see, the following fields that are part of the FontConfiguration block are sent in the HTTP request, with an empty string as value:
FontColor
FontDecoration
FontStyle
This causes the QuickSight API to return an HTTP response with HTTP 400 status code, with the following message:
This causes the
terraform apply
to fail with the following error message:Similar errors are showing on an update operation, as explained in the "Steps to Reproduce" section
Panic Output
No response
Important Factoids
The
parameter_controls
block that is used in this recreation, contains thedropdown
block, but there are also other parameter control types in QuickSight (see here).I didn't try the rest, I only tried with
dropdown
, but the issue may be recreated with the other parameter controls types tooReferences
ParameterControl
part of the QuickSight API reference:https://docs.aws.amazon.com/quicksight/latest/APIReference/API_ParameterControl.html
FontConfiguration
part of the QuickSight API reference:https://docs.aws.amazon.com/quicksight/latest/APIReference/API_FontConfiguration.html
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: