The terraform apply -replace=<resource_address> command provides a way to override this default behavior and explicitly tell Terraform to replace (destroy and then recreate) a specific, already-existing resource instance, even if no configuration changes would normally trigger its replacement.
C is the answer. The full syntax is "terraform apply -replace=[ADDRESS]"
Instructs Terraform to plan to replace the resource instance with the given address. This is helpful when one or more remote objects have become degraded, and you can use replacement objects with the same configuration to align with immutable infrastructure patterns. You cannot use -replace with the -destroy option, and it is only available from Terraform v0.15.2 onwards. For earlier versions, use terraform taint to achieve a similar result.
https://developer.hashicorp.com/terraform/cli/commands/plan#planning-options
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
chessmaster5000
4 weeks, 1 day agoSilentH
5 months, 2 weeks ago