Overview
FusionAuth is a modern, self-hosted identity and access management platform that provides user authentication, authorization, and secure single sign-on. It supports OAuth2, OpenID Connect, and SAML. This template deploys FusionAuth with a PostgreSQL database that is automatically configured and connected — no manual database setup required.What Gets Created
- FusionAuth Workload — The main identity platform with configurable CPU and memory.
- PostgreSQL Workload — The backing database, automatically connected to FusionAuth on startup.
- Volume Set — Persistent storage for PostgreSQL data, with optional autoscaling.
- Backup Cron Job (optional) — A scheduled job that dumps the PostgreSQL database to an S3 or GCS bucket when
postgres.backup.enabledistrue. - Secrets — An opaque PostgreSQL credentials secret, and a startup script secret that waits for database readiness before launching FusionAuth.
- Identity & Policy — An identity bound to the workloads with
revealaccess to the PostgreSQL credentials and startup script secrets. When backup is enabled, the identity also provides the backup cron job with access to the configured object storage bucket.
This template does not create a GVC. You must deploy it into an existing GVC.
Prerequisites
Prerequisites are only required if you plan to enable PostgreSQL backups (postgres.backup.enabled: true). Skip this section if backups are not needed.
AWS S3
-
Create an S3 bucket. Set
postgres.backup.aws.bucketandpostgres.backup.aws.regionin your values file. -
If you do not have a Control Plane Cloud Account set up, follow the Create a Cloud Account guide. Set
postgres.backup.aws.cloudAccountNameto the name of your Cloud Account. -
Create an IAM policy with the following JSON, replacing
YOUR_BUCKET_NAME:
- Set
postgres.backup.aws.policyNameto the name of the policy created in step 3.
GCS
-
Create a GCS bucket. Set
postgres.backup.gcp.bucketin your values file. -
If you do not have a Control Plane Cloud Account set up, follow the Create a Cloud Account guide. Set
postgres.backup.gcp.cloudAccountNameto the name of your Cloud Account. - Add the Storage Admin role to the GCP service account associated with the Cloud Account.
Installation
To install, follow the instructions for your preferred method:UI
Browse, install, and manage templates visually
CLI
Manage templates from your terminal
Terraform
Declare templates in your Terraform configurations
Pulumi
Declare templates in your Pulumi programs
Configuration
The defaultvalues.yaml for this template:
FusionAuth Resources
resources.cpu/resources.memory— CPU and memory allocated to the FusionAuth workload.
Firewall
firewall.external.inboundAllowCIDR— CIDR ranges allowed to reach FusionAuth from the internet (default:0.0.0.0/0).firewall.external.outboundAllowCIDR— CIDR ranges FusionAuth is allowed to reach externally. Empty by default. Set to0.0.0.0/0(or a specific CIDR) if FusionAuth needs to communicate with an external Identity Provider such as Google OAuth.firewall.internal.type— Controls which internal workloads can reach FusionAuth (same-gvc,same-org, orworkload-list).
PostgreSQL
postgres.config.username/postgres.config.password— Database credentials. Change before deploying to production.postgres.config.database— Name of the database created on startup.
These values are only applied on first startup when the data directory is empty. Updating them after the initial deployment will have no effect on the running database. To change credentials or the database name on an existing instance, use PostgreSQL’s native commands (e.g.
ALTER USER, ALTER DATABASE).postgres.resources— Min/max CPU and memory bounds for the PostgreSQL workload.postgres.internalAccess.type— Controls which workloads can reach PostgreSQL. Set tononeto isolate replicas from each other, or usesame-gvc,same-org, orworkload-list.
PostgreSQL Storage
postgres.volumeset.capacity— Initial volume size in GiB (minimum 10).postgres.volumeset.autoscaling.enabled— Automatically expand the volume as it fills. When enabled:maxCapacity— Maximum volume size in GiB.minFreePercentage— Trigger a scale-up when free space drops below this percentage.scalingFactor— Multiply the current capacity by this factor when scaling up.
PostgreSQL Backup
Setpostgres.backup.enabled: true to enable scheduled database dumps to object storage. The backup image tag corresponds to the PostgreSQL version (18.1.0 for Postgres 18, 17.1.0 for Postgres 17).
Set postgres.backup.provider to aws or gcp and fill in the corresponding section. The prefix field controls the folder path within the bucket where backups are stored.
Restoring a Backup
To restore from a backup, run the following from a client with access to the bucket: AWS S3Post-Deployment Setup
After deployment, open the FusionAuth admin panel to complete setup:- Use the setup wizard to create your application.
- Configure your application with the
origin,redirect, andlogoutURLs for your code. - Set the tenant issuer to match your deployment URL (e.g.,
my-fusionauth-app.io). - If using an external Identity Provider, configure it in the admin panel and ensure
firewall.external.outboundAllowCIDRallows traffic to the IdP.