Route breaks Single Entry I'm following the documentation to create a thank-you page when the user submits the form.

I have a single created for /contact-us/ and I want the user to be redirected to /contact-us/thank-you/ when they submit the form. 

I have created the route so contact-us/thank-you shows the contact-us template, but when I go to that URL I get a template error saying Variable "entry" does not exist. 

So it looks like it's showing the template correctly, but not loading the data from the single.
Craft automatically includes the entry variable if the slug matches the url:


  If the URI matches an entry’s or category’s URI, the
  section’s/category group’s template will get loaded, and the matched
  element will be made available to the template via a pre-populated
  entry or category variable.


In your case contact-us gets matched automatically, but contact-us/thank-you does not. This means you have to set entry yourself.

Just add this to the top of your template:

{% if entry is not defined %}
    {% set entry = craft.entries.section('contact-us').first() %}
    {# Fetch single which has 'contact-us' as a handle #}
{% endif %}