serverless-step-functions icon indicating copy to clipboard operation
serverless-step-functions copied to clipboard

Bug Report: Separating the State Function into a separate file causes Configuration warning: at 'stepFunctions': should be object

Open NicholasACTran opened this issue 2 years ago • 2 comments

This is a (Bug Report / Feature Proposal)

Description

I've attempted to separate out my step functions into a separate yml file in order to make the serverless yml easier to read and maintain. I've used the standard convention that works with other plugins:

stepFunctions:
  - ${file(resources/stateMachine1.yml)}
  - ${file(resources/stateMachine2.yml)}

with those individual ymls being in the format:

stateMachines:
  stateMachine1:
   ...

It throws no errors while deploying, but throws a configuration warning. The expectation from other plugins and how the standard serverless.yml file handles this is that the individual files should be inserted into the original serverless.yml file during deployment. Is there work to make this work, or is there another method to approach this?

NicholasACTran avatar Sep 14 '22 01:09 NicholasACTran

I have the same issue, did you solve this problem?

alfonso-jimenez-evelyn avatar Dec 20 '22 17:12 alfonso-jimenez-evelyn

Even is just a warning, the step function is not deployed.

A workaround is available at: https://github.com/serverless-operations/serverless-step-functions/issues/177#issuecomment-1368643212

lmanerich avatar May 21 '23 19:05 lmanerich