# Generating Terraform config fails

**URL:** <https://community.auth0.com/t/generating-terraform-config-fails/130646>\
**Category:** Get Help\
**Tags:** tenants, management-api\
**Created:** [March 27, 2024, 4:43pm UTC](https://community.auth0.com/t/generating-terraform-config-fails/130646 "2024-03-27T16:43:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![darrenk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/darrenk/32/56850_2.png) [@darrenk](https://community.auth0.com/u/darrenk)\
**Post date:** [March 27, 2024, 4:43pm UTC](https://community.auth0.com/t/generating-terraform-config-fails/130646/1 "2024-03-27T16:43:49Z")

</div>

Hi,  
I have followed [https://registry.terraform.io/providers/auth0/auth0/latest/docs/guides/generate\_terraform\_config](https://registry.terraform.io/providers/auth0/auth0/latest/docs/guides/generate_terraform_config) to use the Auth0 CLI to generate Terraform but it fails with no error info reported and does not create the auth0\_generated.tf file.

See [`tf generate` does not create a auth0\_generated.tf file. `terraform plan` fails · Issue #936 · auth0/terraform-provider-auth0 · GitHub](https://github.com/auth0/terraform-provider-auth0/issues/936)  
for all the details.

Thanks

---

<div class="post-metadata">

**Author:** ![darrenk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/darrenk/32/56850_2.png) [@darrenk](https://community.auth0.com/u/darrenk)\
**Post date:** [March 27, 2024, 5:24pm UTC](https://community.auth0.com/t/generating-terraform-config-fails/130646/2 "2024-03-27T17:24:39Z")

</div>

Fix: Ran the auth0 commands from an empty dir.

Cause: Was running auth0 CLI commands from the root dir of a next.js project, containing .env.local and other config files that may have messed with the auth0 CLI.

---

<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:** [April 10, 2024, 5:25pm UTC](https://community.auth0.com/t/generating-terraform-config-fails/130646/3 "2024-04-10T17:25:04Z")

</div>

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