dougmoscrop / serverless-plugin-split-stacks

A plugin to generate nested stacks to get around CloudFormation resource/parameter/output limits
297 stars 68 forks source link

Incompatible with iam-roles-per-function plugin #97

Open toxuin opened 4 years ago

toxuin commented 4 years ago

I see weird behaviour when using together with serverless-iam-roles-per-function plugin.

IAM role in root stack gets parameterized because of role inheritance from the nested stack.

Could there be another step (last?) which un-parameterizes the resources that are in the same stack or right in the root stack?

Seems to be related to https://github.com/dougmoscrop/serverless-plugin-split-stacks/issues/95

tvb commented 4 years ago

I see the same behaviour.

dougmoscrop commented 4 years ago

Parameterization is supposed to detect if theyre in the same stack and handle that

toxuin commented 4 years ago

It would be real nice if it would, but it's reproducible. With serverless-iam-roles-per-function = 💥 , without it = 🌹. Check for yourself.

dougmoscrop commented 4 years ago

Sure, I believe you - I would try to distill it in to a test that fails and go from there

tvb commented 4 years ago

Sure, I believe you - I would try to distill it in to a test that fails and go from there

Can I help with something?

tvb commented 4 years ago

With 80 roles my root stack is getting bloated. I am in need for a solution.

dougmoscrop commented 4 years ago

My general workflow for debugging stuff like this, since it gets pretty messy, is get a minimum reproducible setup going, and then npm link in this library, and just run serverless package with either a debugger, or usually just console.logs

There's an integration tests too, here, so like if you want to help out, add that plugin to the integration tests and open a PR that just has the test failing

dougmoscrop commented 4 years ago

And of course debugging it and having the fix for the test would be even better!