Clone repository to: $GOPATH/src/github.com/yieldr/terraform-provider-auth0
$ mkdir -p $GOPATH/src/github.com/yieldr; cd $GOPATH/src/github.com/yieldr
$ git clone git@github.com:yieldr/terraform-provider-auth0
Enter the provider directory and build the provider
$ cd $GOPATH/src/github.com/yieldr/terraform-provider-auth0
$ make build
The provider isn't listed in the official Terraform repository, so using terraform init
to download the provide won't work. To install the auth0 provider, you can download the binary and place in the directory ~/.terraform.d/plugins
(or %APPDATA%/terraform.d/plugins/
if you're on Windows).
To use the provider define the auth0
provider in your *.tf
file.
provider "auth0" {
"domain" = "<domain>"
"client_id" = "<client-id>"
"client_secret" = "<client-secret>"
}
These variables can also be accessed via the AUTH0_DOMAIN
, AUTH0_CLIENT_ID
and AUTH0_CLIENT_SECRET
environment variables respectively.
Examples of resources can be found in the examples directory. The currently supported Auth0 resources are described below.
- Clients (Applications)
- Client Grants
- Connections
- Custom Domains
- Device Credentials
- Grants
- Resource Servers (APIs)
- Rules
- Rules Configs
- User Blocks
- Users
- Users By Email
- Blacklists
- Email Templates
- Emails
- Guardian
- Jobs
- Tenants
- Missing attributes:
flags
,universal_login
,idle_session_lifetime
.
- Missing attributes:
- Tickets
If you wish to work on the provider, you'll first 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, run make testacc
.
Note: Acceptance tests create real resources, and often cost money to run.
$ make testacc