function process()

in src/declarative-stack.ts [443:461]


  function process(value: any): any {
    if (typeof(value) === 'object' && Object.keys(value).length === 1 && Object.keys(value)[0] === 'Fn::GetAtt') {
      const [id, attribute] = value['Fn::GetAtt'];
      return deconstructGetAtt(stack, id, attribute);
    }

    if (Array.isArray(value)) {
      return value.map(x => process(x));
    }

    if (typeof(value) === 'object') {
      for (const [k, v] of Object.entries(value)) {
        value[k] = process(v);
      }
      return value;
    }

    return value;
  }