[Bug]: aws_rds_cluster.enabled_cloudwatch_logs_exports doesn't allow new instance value #41108
Closed
Description
Terraform Core Version
1.9.2
AWS Provider Version
5.84.0
Affected Resource(s)
aws_rds_cluster
Expected Behavior
Cluster should be created/updated successfully
Actual Behavior
Error is thrown
╷
│ Error: expected enabled_cloudwatch_logs_exports.1 to be one of ["audit" "error" "general" "iam-db-auth-error" "postgresql" "slowquery" "upgrade"], got instance
│
│ with aws_rds_cluster.example,
│ on main.tf line 27, in resource "aws_rds_cluster" "example":
│ 27: enabled_cloudwatch_logs_exports = data.aws_rds_engine_version.example.exportable_log_types
│
╵
Relevant Error/Panic Output Snippet
See above
Terraform Configuration Files
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.79"
}
}
required_version = ">= 1.2.0"
}
provider "aws" {
region = "us-west-2"
}
data "aws_rds_engine_version" "example" {
engine = "aurora-postgresql"
}
resource "aws_rds_cluster" "example" {
engine = "aurora-postgresql"
engine_version = data.aws_rds_engine_version.example.version
master_username = "admin"
manage_master_user_password = true
skip_final_snapshot = true
enabled_cloudwatch_logs_exports = data.aws_rds_engine_version.example.exportable_log_types
}
Steps to Reproduce
Use the provided code and run terraform plan in the us-west-2 region.
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
Yes