We are deploying servers into AWS with terraform. We want to be able to quickly destroy and deploy machines with the same name. The primary reason is we want the machine to maintain any permissions, groups etc it's a member of. Particularly DNS.
To do this, we're trying to reset the computer object account so that the newly deployed machine can assume it. So far, I've tried the following: