作者:起五贪黑_719 | 来源:互联网 | 2023-08-28 03:11
This issue was originally opened by as hashicorp/terraform#22538. It was migrated here as a result of the provider split. The original body of the issue is below.
Using provider.aws: version = "~> 2.24" on an RDS Aurora PostgreSQL 9.6.12 server
When I set aws_rds_cluster.enabled_cloudwatch_logs_exports = ["audit", "error", "general", "slowquery"] I get this error in terraform plan
1 2 3 4 5 6 7
| Error: Error applying plan:
1 error(s) occurred:
* aws_rds_cluster.my_rds_cluster: 1 error(s) occurred:
* aws_rds_cluster.my_rds_cluster: Failed to modify RDS Cluster (my-rds-db): InvalidParameterCombination: You cannot use the log types 'general', 'audit', 'slowquery', 'error' with engine version aurora-postgresql 9.6.12. For supported log types, see the documentation. |
So I refer to the documentation
https://docs.amazonaws.cn/en_us/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.CloudWatch.html
and pull out this example:
1 2 3
| aws rds modify-db-cluster \
--db-cluster-identifier my-db-cluster \
--cloudwatch-logs-export-configuration '{"EnableLogTypes":["postgresql", "upgrade"]}' |
So I set aws_rds_cluster.enabled_cloudwatch_logs_exports = [ "postgresql", "upgrade"] but I get this error in terraform plan
1 2 3
| Error: aws_rds_cluster.my_rds_cluster: expected enabled_cloudwatch_logs_exports.0 to be one of [audit error general slowquery], got postgresql
Error: aws_rds_cluster.my_rds_cluster: expected enabled_cloudwatch_logs_exports.1 to be one of [audit error general slowquery], got upgrade |
I already have an IAM policy in place for RDS to write to CloudWatch logs and the target log paths exist. I do not want to use or pay for the Enhanced Monitoring feature of Aurora RDS.
The Terraform doco for aws_rds_cluster says ["audit", "error", "general", "slowquery"] should work.
Looks like something is not quite right here.
该提问来源于开源项目:hashicorp/terraform-provider-aws
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!