i am working with serverless-step-functions plugin. to invoke the state machines, i am passing the statemachine arn into a lambda function, e.g.:
environment:
statemachine_arn: ${self:resources.Outputs.PasAccountServiceStateMachine.Value}
this reference is established in the resources: outputs section, e.g.:
Outputs:
PasAccountServiceStateMachine:
Description: PasAccountService - State Machine ARN
Value:
Ref: PasAccountService
i am trying to make my serverless.yml file more maintainable by splitting out my stepfunction statemachine definitions into external .yml files. i am encountering that when i do that, the reference i am trying to establish in resources: outputs gets broken. i.e., i get this error while deploying:
Error: The CloudFormation template is invalid: Template format error: Unresolved resource dependencies [PasAccountService] in the Resources block of the template
i have tried searching for ways to reference an object from an external .yml file within the resources: outputs section of a serverless.yml file, but could not find anything useful. please help. what is the correct way to do this?