We have many serverless services. Many of them share some properties. Here is a subset of what they share:
// shared.yaml
frameworkVersion: '3'
configValidationMode: error
plugins:
modules:
- serverless-prune-plugin
- serverless-deployment-bucket
custom:
sharedHost: ${file(./shared-host.config.js)}
prune:
automatic: true
number: 2
Outputs:
UserInformation:
Value: ${self:custom.sharedHost.userId}
Description: ${self:custom.sharedHost.userArn}
GitInformation:
Value: ${self:custom.sharedHost.gitId}
Description: ${self:custom.sharedHost.gitDescription}
Is it possible to add these properties to a serverless.yaml file with one line?
I'm looking for something like:
// services/some-service/serverless.yaml
service: SomeService
join: ${file(../../shared.yaml)}
custom:
someProp: someValue
I'm adding a json tag to the question because I am thinking that if this is not possible using serverless or yaml features, then maybe there is some json feature that could be used.