Last active
October 22, 2022 00:12
-
-
Save jeff-auth0/0e1ab9d8b91b2a36ec0d6d907c9d3442 to your computer and use it in GitHub Desktop.
Create test users in Auth0 tenant
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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