# Utility to work with terraform auth0 provider

**URL:** <https://community.auth0.com/t/utility-to-work-with-terraform-auth0-provider/111644>\
**Category:** Product Feedback\
**Tags:** terraform, auth0\
**Created:** [July 20, 2023, 5:25am UTC](https://community.auth0.com/t/utility-to-work-with-terraform-auth0-provider/111644 "2023-07-20T05:25:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashish.jamthe](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ashish.jamthe/32/14581_2.png) [@ashish.jamthe](https://community.auth0.com/u/ashish.jamthe)\
**Post date:** [July 20, 2023, 5:25am UTC](https://community.auth0.com/t/utility-to-work-with-terraform-auth0-provider/111644/1 "2023-07-20T05:25:45Z")

</div>

Terraform auth0 provider allows import per resource. But you have to know the resource type and resource ID. The get the resource ID, you have to use management API.  
Fetching the resourceIDs this way is very cumbersome, and you have to know all resource types well.  
It will be great if a utility is put together using the management APIs to extract all the resource IDs and types from the tenant, and string together an import command.  
I spent few hours on this, but realised that it requires in depth knowledge of all the auth0 resources, and is not a trivial job.

---

<div class="post-metadata">

**Author:** ![will.vedder](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/will.vedder/32/46585_2.png) [@will.vedder](https://community.auth0.com/u/will.vedder)\
**Post date:** [July 20, 2023, 6:22pm UTC](https://community.auth0.com/t/utility-to-work-with-terraform-auth0-provider/111644/2 "2023-07-20T18:22:16Z")

</div>

@ashish.jamthe This is great feedback, thank you. I understand the ask here but can you dive into your specific use case a bit more? Specifically –

- Are you adopting Terrafom upon a mature Auth0 tenant?
- Do you see this task only being performed once on initialization or would you prefer “exporting” Auth0 resource to Terraform periodically?

---

<div class="post-metadata">

**Author:** ![ashish.jamthe](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ashish.jamthe/32/14581_2.png) [@ashish.jamthe](https://community.auth0.com/u/ashish.jamthe)\
**Post date:** [July 24, 2023, 12:21am UTC](https://community.auth0.com/t/utility-to-work-with-terraform-auth0-provider/111644/3 "2023-07-24T00:21:05Z")

</div>

Hi Will,  
Our tenancy has not gone live yet. But in test for an year, it is a big migration. We have CI/CD pipeline setup using auth0deploy tool. The changes to config mostly happen via Auth0 admin UI, the current plan is to move the changes through environments via auth0deploy CI/CD. After go live the rate of change would be low, so for minor changes like timeout adjustments, it should be possible to change the json config directly instead of via Admin UI. However, it will be difficult to do major changes without resorting to UI.  
So, it is quite possible that we may have to export multiple times.  
As such, auth0deploy tool is ok for this purpose. But terraform is a better DSL to adopt than auth0deploy json. And hopefully, eventually we may get to the maturity to use terraform to completely replace Auth0 UI.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [September 8, 2023, 7:05am UTC](https://community.auth0.com/t/utility-to-work-with-terraform-auth0-provider/111644/4 "2023-09-08T07:05:51Z")

</div>

Hey there everyone! 👋🏼

I thought I’m gonna chime in with something that might be of your interest! We’re hosting an Ask Me Anything Session in our Forum regarding Auth0 Terraform Provider.

It’s gonna be on Thursday, September 28, 2023. Check out more info about it here!

> [@Auth0 Community Ask Me Anything with Auth0 Terraform Provider](https://community.auth0.com/t/ask-me-anything-with-auth0-terraform-provider/115670):
>
> Auth0 by Okta Community Ask Me Anything with Auth0 Terraform Provider The Auth0 Community is excited to invite you to our next interactive online Ask Me Anything (AMA) session on Thursday, September 28, 2023, featuring the Auth0 Terraform Provider Product Team. Did you know that the Auth0 Terraform Provider offers a streamlined way to manage Auth0 configurations using Infrastructure as code, allowing for easy version control, automation, and integration into existing DevOps pipelines? No matter…

---

<div class="post-metadata">

**Author:** ![will.vedder](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/will.vedder/32/46585_2.png) [@will.vedder](https://community.auth0.com/u/will.vedder)\
**Post date:** [September 18, 2023, 3:16pm UTC](https://community.auth0.com/t/utility-to-work-with-terraform-auth0-provider/111644/5 "2023-09-18T15:16:25Z")

</div>

@ashish.jamthe Good news! We’ve just released version 1.1.0 of the [Auth0 CLI](https://auth0.github.io/auth0-cli/auth0_terraform_generate.html) which now supports this functionality through the `auth0 terraform generate` command. We’ve also included an [instructional guide](https://registry.terraform.io/providers/auth0/auth0/latest/docs/guides/generate_terraform_config) with the Auth0 Terraform Provider for getting started.

We believe it should alleviate some of the toil you described above. Please give it a shot and provide feedback!

---

<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:** [October 2, 2023, 3:17pm UTC](https://community.auth0.com/t/utility-to-work-with-terraform-auth0-provider/111644/6 "2023-10-02T15:17:08Z")

</div>

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