# How to add html file in auth0 universal login using terraform

**URL:** <https://community.auth0.com/t/how-to-add-html-file-in-auth0-universal-login-using-terraform/111283>\
**Category:** Get Help\
**Tags:** branding, new-universal-login-page-templates\
**Created:** [July 14, 2023, 1:26pm UTC](https://community.auth0.com/t/how-to-add-html-file-in-auth0-universal-login-using-terraform/111283 "2023-07-14T13:26:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mayank\_jadhav](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@mayank\_jadhav](https://community.auth0.com/u/mayank_jadhav)\
**Post date:** [July 14, 2023, 1:26pm UTC](https://community.auth0.com/t/how-to-add-html-file-in-auth0-universal-login-using-terraform/111283/1 "2023-07-14T13:26:00Z")

</div>

Hi,  
I want to add html code in auth0 branding universal login. I tried with terraform branding resource as:

```auto
resource "auth0_branding" "my_brand" {
  universal_login {
    # Ensure that "{%- auth0:head -%}" and "{%- auth0:widget -%}"
    # are present in the body.
    body = file("test.html")
  }
}

```

But got error as:

```auto
 Error: 400 Bad Request: The template must contain a single auth0:head tag and at least one auth0:widget tag.

```

I also want to enable custom login page but I don’t see any terraform argument to enable it in auth0\_branding resource.

 ![image](https://global.discourse-cdn.com/auth0/original/3X/f/b/fb9c6623631b09eb5e30ac53ceec964f1518610e.png)

How can do it ?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [July 15, 2023, 4:34am UTC](https://community.auth0.com/t/how-to-add-html-file-in-auth0-universal-login-using-terraform/111283/3 "2023-07-15T04:34:09Z")

</div>

Hi @mayank_jadhav,

Thanks for reaching out to the Auth0 Community!

The code snippet you shared is the correct way to add an HTML file to the Auth0 Branding resource to set the HTML for the New Universal Login page.

The error you received indicates that your `test.html` file did not include a single `auth0:head` tag and at least one `auth0:widget` tag.

Following our [Customize New Universal Login Pages](https://auth0.com/docs/customize/universal-login-pages/universal-login-page-templates) documentation, the simplest template that can be written should look like this:

```auto
<!DOCTYPE html><html>
  <head>
    {%- auth0:head -%}
  </head>
  <body>
    {%- auth0:widget -%}
  </body></html>

```

Considering this, could you please confirm if your `test.html` file has a similar structure?

Another quick way to test this is by using the template above to see if the issue goes away. If so, you can gradually add your custom HTML code to identify any conflicts.

Please let me know how this goes for you.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [July 29, 2023, 4:34am UTC](https://community.auth0.com/t/how-to-add-html-file-in-auth0-universal-login-using-terraform/111283/4 "2023-07-29T04:34:14Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
