Idris.AH
Idris.AH

Reputation: 420

Cloudformation template fails due to resource already exists

I have a cloudformation stackset in a master account which deploys stacks into multiple child accounts. I have had some issues where I have had to manually delete some resources. Now, I have completely deleted all the stacks and the stackset (python script). However, now when I want to re-deploy the stackset with all of the stacks, it fails saying that a resource already exists in one of the accounts. In this case, it is a role, but, when I check for that role in that account, it isn't there.

What could be the issue?

Upvotes: 4

Views: 12947

Answers (1)

Idris.AH
Idris.AH

Reputation: 420

It was my error. In my template, I had the same role defined twice in the same account and the tolerance % was set to 0. So if a cloudformation stack build fails once, it will not proceed with the rest of the build. So that was my my build was failing, because it was trying to create the same role twice.

Upvotes: 2

Related Questions