-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
Description
I created a rds instance and asked for the Cloudwatch log-groups to be created:
module "db" {
source = "terraform-aws-modules/rds/aws"
enabled_cloudwatch_logs_exports = ["alert", "audit"]
create_cloudwatch_log_group = true
...
}
It is created successfully. After running terraform destroy
and rerunning terraform apply
I got this error:
Error: Creating CloudWatch Log Group failed: ResourceAlreadyExistsException: The specified log group already exists: The CloudWatch Log Group '/aws/rds/instance/el-vi-rds-oracle/audit' already exists.
with module.db.module.db_instance.aws_cloudwatch_log_group.this["audit"],
on .terraform/modules/db/modules/db_instance/main.tf line 138, in resource "aws_cloudwatch_log_group" "this":
138: resource "aws_cloudwatch_log_group" "this" {
In AWS console I saw that the groups created were not deleted on terraform destroy
.
Versions
- Terraform v1.2.4
- provider registry.terraform.io/hashicorp/aws v4.22.0
- provider registry.terraform.io/hashicorp/random v3.3.2
- RDS 4.7.0
Reproduction Code
- Build a RDS instance like shown in the description
- Run
terraform destroy
- Run
terraform apply
Expected behavior
The Cloudwatch log groups created by the RDS module are removed on running terraform destroy
.
Actual behavior
The Cloudwatch log groups created by the RDS module were not removed on running terraform destroy
.
Metadata
Metadata
Assignees
Labels
No labels