Skip to content

Abacus-Insights/terraform-provider-auth0

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Auth0 Terraform Provider

Build Maintainability Test Coverage Gitter

Sponsors

If you want to quickly implement a secure authentication flow with Terraform, create a free plan at auth0.com/developers.
If you or your company relies on this provider and would like to ensure its continuing support please consider sponsoring.

Usage

Terraform 0.13+

Terraform 0.13 and higher uses the Terraform Registry to download and install providers. To install this provider, copy and paste this code into your Terraform configuration. Then, run terraform init.

terraform {
  required_providers {
    auth0 = {
      source  = "alexkappa/auth0"
      version = "0.17.1"
    }
  }
}

provider "auth0" {}
$ terraform init

Terraform 0.12.x

For older versions of Terraform, binaries are available at the releases page. Download one that corresponds to your operating system / architecture, and move to the ~/.terraform.d/plugins/ directory. Finally, run terraform init.

provider "auth0" {}
$ terraform init

See the Auth0 Provider documentation for all the available resources.

Developers

If you wish to work on the provider, you'll need Go installed on your machine (version 1.10+ is required). You'll also need to correctly setup a GOPATH, as well as adding $GOPATH/bin to your $PATH.

On how to develop custom terraform providers, read the official guide.

To compile the provider, run make build. This will build the provider and install the provider binary in the $GOPATH/bin directory.

$ make build
...
$ $GOPATH/bin/terraform-provider-auth0
...

In order to test the provider, you can simply run make test.

$ make test

In order to run the full suite of Acceptance tests, the following environment variables must be set:

AUTH0_DOMAIN=<your-auth0-tenant-domain>
AUTH0_CLIENT_ID=<your-auth0-client-id>
AUTH0_CLIENT_SECRET=<your-auth0-client-secret>

Then, run make testacc.

Note: The acceptance tests make calls to a real Auth0 tenant, and create real resources. Certain tests, for example for custom domains (TestAccCustomDomain), also require a paid Auth0 subscription to be able to run successfully.

At the time of writing, the following configuration steps are also required for the test tenant:

  • The Username-Password-Authentication connection must have Requires Username option enabled for the user tests to successfully run.

Packages

No packages published

Languages

  • Go 96.0%
  • HCL 2.3%
  • Shell 1.1%
  • Makefile 0.6%