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

Support for additional properties defined by Serverless plugin #43

Open
fredericbarthelet opened this issue Apr 27, 2021 · 2 comments
Open

Comments

@fredericbarthelet
Copy link
Contributor

Original intent : add the serverless-step-functions plugin definition in #39

In order to implement definitions from https://github.com/serverless-operations/serverless-step-functions plugin within this package, one way could simply be to add dependency to this specific plugin in

plugins:
- ./dist/plugin

One downside of such implementation is the lack of constraint for this plugin to be referenced in your serverless.yml before being able to leverage definitions specifics to the plugin. Do you have any idea to enforce such behavior ?

✅ Validation with correct types

const serviceFile: AWS = {
  service: 'my-app'

  plugins: ['serverless-step-functions']

  // It's ok to write those properties as the plugin is referenced above
  stepFunctions: {
    stateMachines: //...
}

❌ Validation with incorrect types

const serviceFile: AWS = {
  service: 'my-app'

  plugins: ['another-plugin']

  // Should not allow those properties, as serverless-step-functions is not referenced in plugins property
  stepFunctions: {
    stateMachines: //...
}
@rsilvr
Copy link

rsilvr commented Oct 23, 2021

For me it's a deal breaker that serverless.ts doesn't allow for custom definitions from plugins. In my case, I need to use the warmup proprerty in the function level (from serverless-warmup-plugin)

But I'll keep one eye on this. Using code instead of yaml it's a great proposition!

@julbr
Copy link

julbr commented Jun 3, 2022

same issue for me with warmup plugin.

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

No branches or pull requests

3 participants