Utility to work with terraform auth0 provider

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.

@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?
1 Like

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.

Hey there everyone! :wave:t3:

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!

@ashish.jamthe Good news! We’ve just released version 1.1.0 of the Auth0 CLI which now supports this functionality through the auth0 terraform generate command. We’ve also included an instructional guide 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!

1 Like

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