Terraform-provider-aws: InvalidParameterCombination: FinalDBSnapshotIdentifier can not be specified when deleting a replica instance

Created on 20 Apr 2018  路  7Comments  路  Source: hashicorp/terraform-provider-aws

Terraform Version

Terraform v0.11.7

  • provider.aws v1.15.0
  • provider.template v1.0.0

Affected Resource(s)

  • aws_db_instance

I have a module that wraps aws_db_instance, and inside that module, I have:

final_snapshot_identifier = "${var.name}-final

I used this module to create a replica, which seemed to work fine. Then I tried to delete it:

terraform destroy -target=module.rds_instance_foo

Giving me the following error:

InvalidParameterCombination: FinalDBSnapshotIdentifier can not be specified when deleting a replica instance

I went as far as commenting out the final_snapshot_identifier line in my module, but I get this error no matter how I try to delete the resource. It seems like FinalDBSnapshotIdentifier is always being sent in the destroy request for some reason. The only way I was able to delete my replica was via the AWS console.

bug servicrds upstream-terraform

Most helpful comment

Got hit by the same bug as mentioned by @mconigliaro.

All 7 comments

Got hit by the same bug as mentioned by @mconigliaro.

I am hitting this bug as well.

Terraform v0.11.7

  • provider.aws v1.19.0

Ditto. Having the same issue

Facing the same issue.

Terraform v.11.7
provider:aws v1.20.0

This does not help TF 0.11 users but it appears that this has been "fixed" in TF 0.12 now that we have null.

skip_final_snapshot = true
final_snapshot_identifier = null

You need to have done an apply with these options set then you can destroy.

Are there any further updates on this bug?
The "fix" @dpiddockcmp mentioned doesn't work unless you can successfully run an apply (in-place). In our case the replica is tainted. As a result running "terraform apply" tries to destroy and recreate - resulting in this error message.

@JayArbo I just ran into this issue as well and was able to work around it by manually "untainting" the resource using the untaint command and then following the instructions from @dpiddockcmp. Hope that helps if you're still stuck.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

obourdon picture obourdon  路  54Comments

oarmstrong picture oarmstrong  路  44Comments

jckuester picture jckuester  路  53Comments

Bwanabanana picture Bwanabanana  路  46Comments

hashibot picture hashibot  路  58Comments