Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align policy naming with serverless framework convention? #600

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kazdy
Copy link

@kazdy kazdy commented Jan 10, 2024

Hi,

I noticed that policies created by serverless-step-functions plugin does not conform to the serverless framework naming convention.

Example serverless framework generated policy name:
abc-serverless-dev-lambda
vs one created with serverless-step-functions plugin:
dev-abc-serverless-statemachine

I tend to use the service name to restrict on what resources my deployment IAM role can operate by checking for ${service-name}-* and this behavior breaks this convention that serverless framework follows.

I don't know if this behavior is intentional or not, but I would like to propose this change and see what others think about it.

@horike37
Copy link
Collaborator

@kazdy

Thank you for proposing the fix. We didn't have the intention not to follow the rule of the Serverless Framework.
It would be better if it could follow the rule, but there is one concern. Is it possible to break the backward compatibility with this PR? If there is someone doing something using my plugin's naming rule, the project would be possibly broken when they upgrade this plugin.

@kazdy
Copy link
Author

kazdy commented Feb 7, 2024

Hi, yes I think this can break stuff if someone adjusted their deployment role for how this plugin builds policy names.
Would it be ok to introduce a feature flag and keep things as is until the time comes to introduce breaking change, providing an alternative still?
Do you think it's worth doing so?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants