Terraform Create instance profile not showing on console

0

I've created three instance profiles generated by Terraform for a project I was attempting.

Unfortunately, the server on which I hosted the state file has been deleted and I forgot to destroy the resources. Ive attempted to destroy the resources through the console but unfortunately, they don't show up there but still show up on the advanced section of the instance profile when trying to launch on the ec2 console. Also rerunning the terraform code gives me an error saying the resource exists but it's not showing on the console. Any suggestions to fix this issue ?

thekid
질문됨 5달 전552회 조회
3개 답변
1

HI,

Check your AWS Region: Ensure that you are checking the AWS Console in the correct region where the resources were created. Sometimes, users mistakenly look in the wrong region and don't see their resources.

Try to use the AWS CLI aws iam list-instance-profiles or aws iam delete-instance-profile --instance-profile-name <instance_profile_name> Replace <instance_profile_name> with the name of the instance profile you want to delete.

If the resources are still inaccessible and you're sure they exist, you may need to reach out to AWS Support for assistance. They may be able to help you identify and resolve the issue.

답변함 5달 전
profile picture
전문가
검토됨 5달 전
  • Or delete the Ec2 Roles if instance profile is attached too and redeploy. Alternatively import them back into state!

0
수락된 답변

I was able to finally solve this issue by running the commands aws iam delete-instance-profile --instance-profile-name <instance_profile_name> while on the root user.

thekid
답변함 5달 전
  • It would be nice if you could accept Jesus answer as this was the correct answer which resolved your problem.

0

Seems an open case, though I suggest to read the thread and try some of the options in there: https://github.com/hashicorp/terraform-provider-aws/issues/22111

profile picture
전문가
답변함 5달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠