“aws Instance Profile already exists error”
$ terraform --version Terraform v0.9.8
This is a know issue with terraform, see:
Update: it turns out that instance profiles don’t show up in the AWS console. Well, they do, but only attached to a role. If you delete the role, but not the policy, then there is no longer a way to see the policy in the console.
Therefore, instead of using the console, you can use the AWS CLI to see all the instance profiles:
aws iam list-instance-profiles
With that command, I found the old, conflicting profiles, so the terraform error message was correct.
Instructions for Ubuntu:
$ sudo apt install python-pip
$ pip install awscli
$ pip install –upgrade pip
$ aws configure
Delete the instance profile
$ aws iam delete-instance-profile –instance-profile-name <instance_profile_name>