lib/classes/Variables.js/Variables/getValueFromSource
class Variables:  getValueFromSource(variableString, propertyString) {
    let ret;
    if (this.tracker.contains(variableString)) {
      ret = this.tracker.get(variableString, propertyString);
    } else {
      for (const { regex, resolver } of this.variableResolvers) {
        if (variableString.match(regex)) {
          ret = resolver(variableString);
          break;
        }
      }
      if (!ret) {
        const errorMessage = [
          `Invalid variable reference syntax for variable ${variableString}.`,
          ' You can only reference env vars, options, & files.',
          ' You can check our docs for more info.',
        ].join('');
        ret = BbPromise.reject(new this.serverless.classes.Error(errorMessage));
      }
      ret = this.tracker.add(variableString, ret, propertyString);
    }
    return ret;
  }