Skip to content

[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
Code language: Bash (bash)

Step 2 – Delete the Instance Profile/s

aws iam delete-instance-profile --instance-profile-name <name-of-instance-profile>
Code language: Bash (bash)

See also  Multiples of 3 and 5 with Python
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x