pippiio / aws-rds

Terraform module for deploying AWS RDS resources
Mozilla Public License 2.0
0 stars 0 forks source link

Hard coded log types, not working in newer version of RDS #7

Open nfn06 opened 10 months ago

nfn06 commented 10 months ago

Cannot use the log types 'general', 'audit', 'slowquery', 'error' with engine version postgres 15.3.

│ Error: creating RDS DB Instance (pippi-db): InvalidParameterCombination: You cannot use the log types 'general', 'audit', 'slowquery', 'error' with engine version postgres 15.3. For supported log types, see the documentation.
│       status code: 400, request id: 7d55c326-88ea-417f-b95c-201fb051171b
│ 
│   with module.rds.aws_db_instance.this,
│   on .terraform/modules/rds/rds.tf line 1, in resource "aws_db_instance" "this":
│    1: resource "aws_db_instance" "this" {
│ 
nfn06 commented 10 months ago
[enabled_cloudwatch_logs_exports](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#enabled_cloudwatch_logs_exports) - (Optional) Set of log types to enable for exporting to CloudWatch logs. If omitted, no logs will be exported. Valid values (depending on engine). MySQL and MariaDB: audit, error, general, slowquery. PostgreSQL: postgresql, upgrade. MSSQL: agent , error. Oracle: alert, audit, listener, trace.

https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance#enabled_cloudwatch_logs_exports When setting postgresql, this errror occurs. the eneabled logs are only for mysql