I have created a serverless plugin today in order to resolve variable substitution from Terraform output. It’s super simple and early days, but may be useful to others:
Feel free to open issues or offer feedback.
Thanks to the serverless-plugin-git-variables and serverless-iam-roles-per-function projects for reference in getting this working so fast.
In the past I have bridged the Terraform gap by creating a CloudFormation stack via Terraform whose sole purpose was to export variables. This has some pro’s and cons IMHO. Not being able to change or remove exported variables can be a PITA, or a life saver.