Open jar-b opened 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
There are more issues with how config_parameter{}
is implemented
After workgroup is created with one of custom params subsequent TF plan will suggest to overwrite default params with a single custom param
~ config_parameter {
~ parameter_key = "auto_mv" -> "max_query_execution_time"
~ parameter_value = "true" -> "300"
}
- config_parameter {
- parameter_key = "datestyle" -> null
- parameter_value = "ISO, MDY" -> null
}
- config_parameter {
- parameter_key = "enable_case_sensitive_identifier" -> null
- parameter_value = "false" -> null
}
...
which will fail due to https://docs.aws.amazon.com/redshift-serverless/latest/APIReference/API_UpdateWorkgroup.html
ValidationException: Can't update multiple configurations at the same time for workgroup
Unfortunately, you can't manually define default params. Hence, no workaround there
expected config_parameter.0.parameter_key to be one of [datestyle enable_user_activity_logging query_group search_path max_query_execution_time], got auto_mv
Hello! Encountered this as I was trying to deploy a Redshift cluster for Zero ETL integration from a MySql rds database. I need to set all the defaults parameters in order to not trigger an update that will cause an error on every deploy. See https://github.com/pulumi/pulumi-aws/issues/4405 for more details.
Terraform Core Version
1.6.0
AWS Provider Version
5.20.1
Affected Resource(s)
aws_redshiftserverless_workgroup
Expected Behavior
When a query monitoring metric
config_parameter
with a numeric value (i.e.max_return_row_count
) is removed, the update operation should unset it on the remote workgroup.Actual Behavior
The
config_parameter
remains in place.From observing how parameters are removed in the AWS console, it appears the desired config_value should be set to
-1
to remove it (versus omitting it from the input altogether). For example, here is the request payload from the console operation wheremax_return_row_count
was removed. All available parameters are sent with a value of-1
, except formax_query_execution_time
, which has a configured value.{"configParameters":[{"parameterKey":"max_query_cpu_time","parameterValue":"-1"},{"parameterKey":"max_query_blocks_read","parameterValue":"-1"},{"parameterKey":"max_scan_row_count","parameterValue":"-1"},{"parameterKey":"max_query_queue_time","parameterValue":"-1"},{"parameterKey":"max_query_cpu_usage_percent","parameterValue":"-1"},{"parameterKey":"max_query_temp_blocks_to_disk","parameterValue":"-1"},{"parameterKey":"max_join_row_count","parameterValue":"-1"},{"parameterKey":"max_nested_loop_join_row_count","parameterValue":"-1"},{"parameterKey":"max_return_row_count","parameterValue":"-1"},{"parameterKey":"max_query_execution_time","parameterValue":"100"}],"workgroupName":"jb-test"}
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
config_parameter
terraform apply
terraform apply
terraform plan
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None