This example documents how to deploy FusionAuth and its database using Terraform.
This code illustrates how to:
- Use the Docker Terraform Provider
- Create a FusionAuth container and its database container
- Install the Terraform CLI, https://developer.hashicorp.com/terraform/tutorials/docker-get-started/install-cli
- Install OrbStack or Docker Desktop
- Initialize the directory
terraform init
- Create the infrastructure
terraform apply
- Format and validate configuration changes
terraform fmt
terraform validate
- Inspect state
terraform show
- List the resources in the project state
terraform state list