taskcat icon indicating copy to clipboard operation
taskcat copied to clipboard

Missing Capabilities [CAPABILITY_NAMED_IAM] option

Open jorgebonilla opened this issue 8 years ago • 5 comments

I was unable to test an IAM roles/Policy CFT due to missing option to add CAPABILITY_NAMED_IAM

Error: An error occurred (InsufficientCapabilitiesException) when calling the CreateStack operation: Requires capabilities : [CAPABILITY_NAMED_IAM]

Line 919 of taskcat/stacker.py: self.set_capabilities('CAPABILITY_IAM') should probably be: self.set_capabilities('CAPABILITY_NAMED_IAM')

jorgebonilla avatar Jan 16 '18 00:01 jorgebonilla

We are evaluating the pros and cons of making that change.

I'm fairly certain that if we changed that line, your test run would still fail across regions because of resource name collisions on global services like IAM or S3, for example.

Are you only testing in a single region?

santiagocardenas avatar Jan 16 '18 00:01 santiagocardenas

If there were a way to run one test at the time, or even one region at the time then it wouldn't fail. Perhaps an option to "sequential test" instead of current "parallel" behavior if you will.

To answer the initial question, yes, we will be indeed testing in many regions.

jorgebonilla avatar Jan 16 '18 00:01 jorgebonilla

So that is the issue, because well-architected deployments can be multi-region (or even deployed in multiple regions). Your templates would not work.

Instead, we recommend to avoid naming (or giving custom names) to resources and allow CloudFormation to do that work for you.

santiagocardenas avatar Jan 16 '18 00:01 santiagocardenas

Agreed, and understood. However, this issue can also be solved by having an install phase before the testing phase, where we could install the IAM roles required AND other CFT that are not being tested, before we run the actual templates that we want to test. And the IAM role CFT could be previously tested separately in a single region. Just a thought.

jorgebonilla avatar Jan 16 '18 01:01 jorgebonilla

Fixed in https://github.com/aws-quickstart/taskcat/pull/50/commits/d7805f97f9a0b2d27e5cd6d50fb89b68f8da6aa5

tonynv avatar Mar 06 '18 08:03 tonynv