title: Accessing name of parent Cloudformation stack in nested stack
body: <p>I'm using a nested Cloudformation template structured like this:</p>
  
  <p>masterTemplate -> childA -> childB</p>
  
  <p>Each of the JSON template files is stored in S3 with a bucket name of "${masterStackName}-env-upload". This works fine from the parent template, as I can simply do:</p>
  
  <pre><code>"TemplateURL":  {
            "Fn::Join": [
              "",
              [
                "https://s3.amazonaws.com/",
                {
                  "Ref": "AWS::StackName"
                },
                "-env-upload/device-specific-template-HALO-BUILD-VERSION.json"
              ]
            ]
          },
  </code></pre>
  
  <p>However, when childA attempts to do the same thing to launch the childB template, "AWS::StackName" becomes the generated name for childA - meaning that it is trying to access a non-existent bucket.</p>
  
  <p>My question is: how can I pass down the name of the master/parent stack to the child stacks? I attempted to do this as a Parameter, but "Ref" is not allowed for parameter values (so I couldn't do "Ref" : "AWS::StackName" for the value).</p>
  
  <p>Any help is appreciated!</p>