Closed anderaus closed 2 weeks ago
you should probably file this issue against the auth0-cli repo. As that is where the generate command is actually run. I will investigate whether it can be fixed there, much of the functionality for this is actually implemented by the terraform cli, but it may be possible to fix the ordering...
Checklist
Describe the problem you'd like to have solved
It seems the output from
auth0 tf generate
inauth0_generated.tf
is in random order (per resource type). Is there a way to get the output in predictable order? Or at least in the same order on every execution?We are currently not applying Terraform plans, but use
auth0 tf generate
to created "backups" of our auth0 configuration. We're making changes directly in the Auth0 UI, but want to re-generate the Terraform plan after each manual change so we're able to diff the changes and keep track of the history in source control (until we have the proper CI in place to start using Terraform plans for all changes).Describe the ideal solution
The content of
auth0_generated.tf
is created in the same order every time we execute it on the same tenantAlternatives and current workarounds
I considered creating a tf file for every single resource type separately. If I script this and output it to separate folders, I should get an end result that can be commited to source control, repeated and diff'ed, but it's a hacky workaround. Example:
auth0 tf generate -r auth0_action -o tenant1_auth0_action_tf
auth0 tf generate -r auth0_client -o tenant1_auth0_client_tf
... repeat for each resource typeAdditional context
No response