/auth0-IaC

🏗 Different infrastructure as code alternatives to deploy your Auth0 tenant

Primary LanguageC#

auth0-IaC

Just playing a bit with Auth0 🔐, Terraform 🏗️ , auth0-deploy-cli 🧑‍💻 and Pulumi 🟪

Prerequisites

Running commands

First, you need to update the .env file with your application credentials as described in Prerequisites:

Go to the src folder and then type one of the following commands (depending on the infrastructure you want to deploy):

  1. The command below will publish all infrastructure in your tenant with terraform:
docker-compose up --build terraform

After that, get the Sample App credentials in terraform.tfstate file and update # Sample app section of .env file.

  1. The command below will publish all infrastructure in your tenant with auth0-deploy-cli:
docker-compose up --build auth0-cli
  1. The command below will publish all infrastructure in your tenant with pulumi:
docker-compose up --build pulumi

After that, get the Sample App credentials in Auth0 portal (go to Applications > Applications > Sample app client > Settings > Basic Information) . Then, update # Sample app section of .env file.

As sample-app uses https endpoints, you need to create a localhost certificate, got to the scripts folder and type the following command:

./gen-cert.sh

After that, you need to trust the certificate servercert.crt that was created in certificates folder. To do that, you can follow one of the following ways (depending on your OS):

Mac Os

Windows

Linux

After your infra is up, you're able to run the Regular Web application:

docker-compose up --build sample-app

Open the client in your favorite browser:

http://localhost/