Worried I’ve gotten myself into a little pickle…
I have a resource (an
aws_iam_group) which I renamed. For example:
resource "aws_iam_group" "foo"
resource "aws_iam_group" "bar"
NOTE: Nothing about the AWS resource other than the Terraform name changed!
The group can’t be destroyed automatically because there are many users who are already members of that group.
So, I performed an
import of the new resource name, which worked fine. Except now every
plan operation is attempting to destroy the old resource, which I don’t want it to do; I just want it gone from the state tracking. Everything else is 100% correct.
Is there any easy way for me to correct this?
I guess additionally, is there an easy way for me to rename a resource in the future w/o TF attempting to completely nuke and re-create it?