-
Notifications
You must be signed in to change notification settings - Fork 35
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
Number per env in automatic prune #21
Comments
Hi @r0mflip Thanks for the idea! I can totally see your use-case. And I appreciate you checking in before beginning implementation. However, I don't think per-environment configuration within-plugin is the right path forward here, as serverless.yml already has pretty powerful variable resolution. I think this functionality is best served through that framework capability. For example, if you prefer to keep per-environment pruning as config inside your project: custom:
prune:
automatic: true
number: ${file(./environments.yml):${self:provider.stage}.prune} with environments.yml containing: dev:
prune: 1
stg:
prune: 3
prd:
prune: 4 You can also reference an environmental variable provided by your CI/CD pipeline, to override a default: custom:
prune:
automatic: true
number: ${env:PRUNE_NUMBER, 3} Another common pattern would be to reference configuration from an SSM Parameter Store key. Hope this helps! |
Whoh, I totally forgot that this can be done by using the first method that you've mentioned. Thank you so much, that would help me with my use case. And would appreciate if the same is added to readme. |
Good point. I'll try to add in an FAQ and/or a "Tips" section to the readme to cover things like this sometime in the next week or so. |
Can we make the number key accept object so that we can specify values for multiple envs
Also supporting old behavior
IMHO This helps in a more declarative process in CI/CD
And also if this is acceptable I would like to work on it.
The text was updated successfully, but these errors were encountered: