Hi,
I created a module for Redshift, it works very well until today when i wanted to do a destroy. I’m getting this error :
Error: Redshift Cluster Instance FinalSnapshotIdentifier is required when a final snapshot is required
Terraform Version
0.12.9
Terraform Configuration Files
This is my code :
resource "aws_redshift_cluster" "redshift" {
cluster_identifier = "${var.project}-${var.cluster_name}-redshift-${var.environment}"
database_name = "${var.db_name}"
port = "${var.db_port}"
master_username = "${var.db_master_username}"
master_password = "${random_string.db_password.result}"
node_type = "${var.node_type}"
cluster_type = "${var.cluster_type}"
number_of_nodes = "${var.number_of_nodes}"
automated_snapshot_retention_period = "${var.automated_snapshot_retention_period}"
publicly_accessible = "${var.publicly_accessible}"
vpc_security_group_ids = "${var.security_groups}"
cluster_subnet_group_name = "${aws_redshift_subnet_group.subnet.id}"
iam_roles = "${var.iam_roles}"
snapshot_cluster_identifier = var.snapshot_cluster_identifier != "" ? var.snapshot_cluster_identifier : null
lifecycle { ignore_changes = ["tags.DateTimeTag"] }
}
I tried to add :
skip_final_snapshot = true
But i got the same error.
Expected Behavior
The cluster deleted
Actual Behavior
The cluster is not deleted due to the error !
**
Error: Redshift Cluster Instance FinalSnapshotIdentifier is required when a final snapshot is required
**