title: In Cloudformation YAML, use a Ref in a multiline string (? use Fn:Sub)
body: <p>Imagine you have a aws resource such as</p>
  
  <pre><code>  Resources:
      IdentityPool:
        Type: "AWS::Cognito::IdentityPool"
        Properties:
          IdentityPoolName: ${self:custom.appName}_${self:provider.stage}_identity
          CognitoIdentityProviders:
            - ClientId:
                Ref: UserPoolClient
  </code></pre>
  
  <p>The Ref for "AWS::Cognito::IdentityPool" returns the id of this resource.  Now lets say I want to reference that id in a multiline string. I've tried</p>
  
  <pre><code>Outputs:  
    AmplifyConfig:
      Description: key/values to be passed to Amplify.configure(config);
      Value: |
        {
          'aws_cognito_identity_pool_id': ${Ref: IdentityPool}, ##&lt;------ Error
          'aws_sign_in_enabled': 'enable',
          'aws_user_pools_mfa_type': 'OFF',
        }
  </code></pre>
  
  <p>I've also tried to use Fn:Sub but without luck.  </p>
  
  <pre><code>   AmplifyConfig:
        Description: key/values to be passed to Amplify.configure(config);
        Value: 
          Fn::Sub 
            - |
              {
                'aws_cognito_identity_pool_id': '${Var1Name}',
                'aws_sign_in_enabled': 'enable',
              }
            - Var1Name:
                Ref: IdentityPool
  </code></pre>
  
  <p>Any way to do this?</p>