[Solved] Instance Profile Already Exists in Terraform

If you get the Instance Profile already exists error when running your Terraform apply, then it is either because an instance profile with that name already existed in the account, or because the previous terraform destroy did not remove it.

Step 1 – Identify the Instance Profiles in the account

aws iam list-instance-profiles

Step 2 – Delete the Instance Profile/s

aws iam delete-instance-profile --instance-profile-name <name-of-instance-profile>