title: In AWS CloudFormation are booleans and strings of booleans interchangeable?
body: <p>I am confused by how AWS CloudFormation treats booleans and <em>strings</em> of booleans.</p>
  
  <p>For instance, are <code>'true'</code> and <code>true</code> (or <code>'false'</code> and <code>false</code>) logically equivalent as far as CloudFormation is concerned? I see examples of both cases in their Quick Start templates that lead me to think they are (even though I haven't found documentation of this one way or another).</p>
  
  <p>For instance, in their template, <a href="https://github.com/aws-quickstart/quickstart-compliance-common/blob/d6964392ef2c666c68c560558b17157e1e135ff6/templates/vpc-production.template#L128" rel="nofollow noreferrer">quickstart-compliance-common/templates/vpc-production.template</a>, they define a variable, <code>pSupportsNatGateway</code>, of type "String" (even though its default is the <em>literal</em> value, <code>true</code>):</p>
  
  <pre><code>Parameters:
    ...
    pSupportsNatGateway:
      Description: Specifies whether this region supports NAT Gateway (this value is
        determined by the main stack if it is invoked from there)
      Type: String
      Default: true
  </code></pre>
  
  <p>Then, in a <a href="https://github.com/aws-quickstart/quickstart-compliance-common/blob/d6964392ef2c666c68c560558b17157e1e135ff6/templates/vpc-production.template#L176" rel="nofollow noreferrer">condition</a> later in the template, that parameter (presumably a String) is compared to the <em>literal</em> value, <code>true</code>.</p>
  
  <pre><code>Conditions:
    ...
    cSupportsNatGateway:
      !Equals
      - true
      - !Ref pSupportsNatGateway
  </code></pre>
  
  <p>My question is, how does CloudFormation compare literal values and <em>strings</em> of those values? Where is this defined in the AWS documentation?</p>