title: Fn::If condition based on environment for Cloudformation Parameters
body: <p>Based on the environment, I am trying to set the URL for a variable: It staging my URL should be <a href="https://staging.DNHostedZoneName" rel="nofollow noreferrer">https://staging.DNHostedZoneName</a> , if prod - it should just be <a href="https://DNSHostedZoneName" rel="nofollow noreferrer">https://DNSHostedZoneName</a>:</p>
  
  <p>Here's my condition:</p>
  
  <pre><code>Conditions:
    IsEnvProd: Fn::Equals [ !Ref Env, 'prod' ]
    IsEnvStage: Fn::Equals [ !Ref Env, 'stage' ]
  </code></pre>
  
  <p>Here's where its been evaluated:</p>
  
  <pre><code>          Environment:
              - Name: NODE_ENV
                Value: !Ref NodeEnv
              - Fn::If:
                - IsEnvStage
                - Name: CORE_URL
                  Value:
                    Fn::Join:
                      - ""
                      - - "https://"
                        - "staging"
                        - "."
                        - !Ref DnsHostedZoneName
                - Name: NCVCORE_URL
                  Value:
                    Fn::Join:
                      - ""
                      - - "https://"
  
                        - !Ref DnsHostedZoneName
  </code></pre>
  
  <p>I am getting the following error:</p>
  
  <pre><code> Template format error: Conditions can only be boolean operations on parameters and other conditions
  </code></pre>