Skip to content

Instantly share code, notes, and snippets.

@jeff-auth0
Last active October 22, 2022 00:12
Show Gist options
  • Save jeff-auth0/0e1ab9d8b91b2a36ec0d6d907c9d3442 to your computer and use it in GitHub Desktop.
Save jeff-auth0/0e1ab9d8b91b2a36ec0d6d907c9d3442 to your computer and use it in GitHub Desktop.
Create test users in Auth0 tenant
terraform {
required_providers {
auth0 = {
source = "auth0/auth0"
version = "0.39.0"
}
}
}
provider "auth0" {
domain = "<domain>"
# Create a m2m application in Auth0
# Authorize m2m application access to Management API
client_id = "<client-id>"
client_secret = "<client-secret>"
}
resource "random_uuid" "guid" {
}
# <count> - Number of test users you want to create in Auth0.
resource "auth0_user" "user" {
count = "<count>"
connection_name = "Username-Password-Authentication"
name = "${random_uuid.guid.result} ${count.index}"
email = "${random_uuid.guid.result}${count.index}@example.com"
email_verified = true
password = "<password>"
picture = "https://gravatar.com/avatar/ac3f9fd1d9cd121d212af6e140849360?s=400&d=robohash&r=x"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment