Closed zaphod72 closed 7 months ago
auth0 version 1.4.0 54e9a30eeb58a4a7e40e04dc19af6869036bfb32
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.
@zaphod72,I had the same issue and thanks to your post I realised that I messed up the credentials in the env variables.
@zaphod72 I have the same issue (same version, auth0 version 1.4.0 54e9a30eeb58a4a7e40e04dc19af6869036bfb32), and I tried to run in an empty directory, but still the same issue
❯ mkdir foo
❯ cd foo
❯ auth0 tf generate --output-dir tmp-auth0-tf
Fetching data from Auth0... done
Generating Terraform configuration... failed
▸ Terraform resource config generated successfully but there was an error with terraform plan.
▸ Run cd tmp-auth0-tf && ./terraform plan to troubleshoot
▸ Once the plan succeeds, run ./terraform apply to complete the import.
▸ The terraform binary and auth0_import.tf files can be deleted afterwards.
The auth0_import.tf
file looks right to me, but the auth0_main.tf
only have provider block
terraform {
required_version = "~> 1.5.0"
required_providers {
auth0 = {
source = "auth0/auth0"
version = ">= 1.0.0"
}
}
}
provider "auth0" {
debug = true
}
Checklist
Description
Starting with an empty dir. I run
The
Import block
error repeats for every item in the auth0_import.tf file.No auth0_generated.tf file exists.
Expectation
Generating Terraform configuration... failed
would be successful and all necessary .tf files generated.Reproduction
Followed creation of M2M application as per https://registry.terraform.io/providers/auth0/auth0/latest/docs/guides/quickstart#create-a-machine-to-machine-application
Double-checked the exported
AUTH0
env vars are correct.Followed instructions at https://registry.terraform.io/providers/auth0/auth0/latest/docs/guides/generate_terraform_config
Auth0 Terraform Provider version
1.5.0
Terraform version
1.7.4