title: Serverless variable interpolation env:VAR fallback using Fn::GetAtt
body: <p>When using the serverless framework to deploy my application, my staging/production environments use the respective ElasticCache instances spun up as part of the resources required for the application and the endpoint is set as an environment variable.</p>
  <pre><code>  environment:
      REDIS_URL:
        Fn::Join:
          - ''
          - - 'redis://'
            - Fn::GetAtt: [ElasticCacheCluster, RedisEndpoint.Address]
  </code></pre>
  <p>The above implementation works fine, but when using <code>serverless-offline</code> this obviously doesn't get a real Endpoint and REDIS_URL ends up as <code>redis://[object Object]</code>.</p>
  <p>What I would like to do is use <code>env:REDIS_URL</code> if present, and if not, set it using Fn::GetAtt as above.</p>
  <p>Given the normal fallback syntax is <code>${env:REDIS_URL, fallback}</code> I assumed I'd be able to use some form of the above Fn:GetAtt but I can't seem to get the syntax to work.</p>
  <pre><code>  environment:
      REDIS_URL: ${env:REDIS_URL,
        { Fn::Join:
          - ''
          - - 'redis://'
            - Fn::GetAtt: [ElasticCacheCluster, RedisEndpoint.Address] }
      }
  </code></pre>
  <p>How can this be done?</p>