title: How to have Fn::Join nested inside of Fn::If?
body: <p>I have a bash script that I want to run on my instances but I only want the second portion of the script to run if a value is true. Also, I would prefer to not have the if statement take place in the script.</p>
  
  <pre><code>Parameters:
     #TestParameter = TRUE
  Resource:
     UserData:  
        Fn::Sub: |
            echo "This is a test example"
            #If TestParameter is true:
            echo "Only is parameter is true"
  </code></pre>