I have somehow created a mismatch between my Terraform config and my AWS RDS instances and now when applying a change to the environment I always get the following error.
Instance: DBInstanceAlreadyExists: DB instance already exists
│ status code: 400, request id: c64d6667-33b3-4b21-9d39-e75ac6b87633
Is there a way to ignore these errors if the instance already exists and just continue on applying other changes?
This is my definition for the RDS instance.
resource "aws_rds_cluster_instance" "default" {
count = 1
cluster_identifier = aws_rds_cluster.default.id
identifier = "${var.environment}-dfs-${count.index}"
publicly_accessible = true
performance_insights_enabled = true
instance_class = var.database.instance_type
engine = aws_rds_cluster.default.engine
engine_version = aws_rds_cluster.default.engine_version
db_subnet_group_name = var.database.subnet_group
}
Providers:
aws = {
source = "hashicorp/aws"
version = "~> 3.0"
}
Terraform version: v1.3.3