Updated
Terraform provider
The Algizian Terraform provider manages your tenants as code: the tenant and its branding, the custom domain, OIDC clients, your own Google, Microsoft or Apple apps, email sign-in and service accounts, with free-form tags on every object. It is open source (MPL-2.0): github.com/elmerisllc/terraform-provider-algizian. Every resource and data source has a reference page there, with arguments, examples and import syntax.
Install
terraform {
required_providers {
algizian = {
source = "elmerisllc/algizian"
}
}
}
provider "algizian" {}
Install from the release files
The Terraform Registry listing is being set up. Until it is live, install a signed release from GitHub Releases; the required_providers block above is the same either way. Terraform does not check the signature of a provider installed this way, so the steps verify it first (signing key fingerprint ED44 4BC2 F9FA 6B97 77FA 2DD3 2AAD E6A6 6F09 51D4).
VERSION=0.1.0; OS=linux; ARCH=amd64 # OS: linux, darwin, windows, freebsd; ARCH: amd64, arm64, 386, arm
BASE=https://github.com/elmerisllc/terraform-provider-algizian/releases/download/v$VERSION
ZIP=terraform-provider-algizian_${VERSION}_${OS}_${ARCH}.zip
SUMS=terraform-provider-algizian_${VERSION}_SHA256SUMS
cd "$(mktemp -d)"
curl -fsSLO "$BASE/$ZIP" -O "$BASE/$SUMS" -O "$BASE/$SUMS.sig"
curl -fsSLO https://raw.githubusercontent.com/elmerisllc/terraform-provider-algizian/main/KEYS.asc
gpg --import KEYS.asc
gpg --verify "$SUMS.sig" "$SUMS" # expect "Good signature" and the fingerprint above
sha256sum --ignore-missing -c "$SUMS" # macOS: shasum -a 256 --ignore-missing -c "$SUMS"
# Terraform's default local plugin folder (Windows: %APPDATA%\terraform.d\plugins)
DIR=~/.terraform.d/plugins/registry.terraform.io/elmerisllc/algizian
mkdir -p "$DIR" && mv "$ZIP" "$DIR/"
Then set version = "0.1.0" and run terraform init; Terraform finds the zip in that folder and reports it as unauthenticated. For several platforms or machines, point a filesystem_mirror block in your CLI configuration at a shared folder, and run terraform providers lock -fs-mirror=<folder> -platform=<os_arch> once per platform.
OpenTofu
The same provider works with OpenTofu (tested with OpenTofu 1.13): the configuration above does not change. It is not in the OpenTofu registry yet, so install the signed release as above and point a filesystem_mirror in your OpenTofu CLI configuration (or in the file named by TF_CLI_CONFIG_FILE) at a folder that holds the zip under OpenTofu's registry host name:
provider_installation {
filesystem_mirror {
path = "/path/to/mirror"
include = ["registry.opentofu.org/elmerisllc/algizian"]
}
direct {
exclude = ["registry.opentofu.org/elmerisllc/algizian"]
}
}
Put the zip at /path/to/mirror/registry.opentofu.org/elmerisllc/algizian/terraform-provider-algizian_0.1.0_linux_amd64.zip and run tofu init.
Authenticate with an organization token
The provider needs one API token, from the ALGIZIAN_TOKEN environment variable or the token argument. Use a token that belongs to your organization: an admin token (it can create and change tenants) or the credential of an admin service account (it keeps working when people leave your team). The provider asks the API which organization the token belongs to, so the provider block can stay empty. A read token can only read, which is enough for the data sources.
You create it by asking an AI assistant connected over MCP ("Create an admin token named terraform for my organization") or with the management API; the Tokens page of your organization in the signed-in area lists and revokes them. Treat it as a secret: keep it in an environment variable or a secret store, never in the configuration.
| What | Admin token or admin service account |
|---|---|
| create and configure tenants, branding and sign-in providers | yes (the tenant name <slug>.algizian.com is assigned) |
| add custom domains, clients and your own provider apps | yes, within your plan |
| create service accounts and their credentials | admin token only, not a service account |
| delete tenants of your organization | yes, unless the tenant is locked |
A first configuration
resource "algizian_tenant" "app" {
name = "Acme Games"
providers = ["google", "microsoft", "apple"]
branding = {
display_name = "Acme Games"
primary_color = "#1f6feb"
}
locked = true # see "Protect production tenants" below
}
resource "algizian_custom_domain" "app" {
tenant = algizian_tenant.app.slug
hostname = "login.example.com"
}
resource "algizian_client" "web" {
tenant = algizian_tenant.app.slug
name = "Acme Games web"
type = "confidential"
redirect_uris = ["https://games.example.com/auth/callback"]
}
Create the DNS record in the same configuration from algizian_custom_domain.app.cname_name and cname_target with your DNS provider's Terraform provider; the custom domains page explains the record and the statuses. The issuer of the tenant is the custom domain once it is active, so attach it before any client or token depends on the tenant.
Resources and data sources
| Name | What it manages |
|---|---|
algizian_tenant | A tenant: name, branding, sign-in providers, tags, deletion lock |
algizian_custom_domain | The tenant's own sign-in domain and the DNS record it needs |
algizian_client | An OIDC client (public or confidential) |
algizian_provider_credentials | Your own Google, Microsoft or Apple app, see provider apps. Steam's optional Web API key is set with the management API for now |
algizian_email_settings | Email-code sign-in, see email sign-in |
algizian_service_account and algizian_service_account_token | A machine identity of your organization and its credential |
data algizian_tenant, algizian_tenants, algizian_providers | Read a tenant and its issuer, list tenants (optionally by tag), list the sign-in providers |
Several organizations
Declare the provider once per organization with an alias, each with its own token, and pick one per resource:
provider "algizian" {
alias = "acme"
token = var.acme_token
}
provider "algizian" {
alias = "globex"
token = var.globex_token
}
resource "algizian_tenant" "acme_app" {
provider = algizian.acme
name = "Acme app"
}
resource "algizian_tenant" "globex_app" {
provider = algizian.globex
name = "Globex app"
}
Tags
Tenants, clients, service accounts and their tokens take tags, a map of labels (at most 20; keys start with a letter and use a-z 0-9 . _ : -, values up to 256 characters). Algizian never uses them. They are for you: cost centers, environments, owners. Setting tags replaces the whole map and tags = {} clears it. The algizian_tenants data source filters by tags:
data "algizian_tenants" "production" {
tags = { env = "prod" }
}
Protect production tenants
Destroying a tenant deletes all its users, signing keys and data, and cannot be undone. Set locked = true on a production tenant: while it is true, the API refuses to delete the tenant for every token with a 409, and so does terraform destroy. To retire it, set locked = false, apply, then destroy. Leave locked off for temporary tenants, for example one created per test run: terraform destroy removes them with an organization admin token and no extra steps.
Secrets and the state
Algizian shows a client secret and a service-account token once, when they are created. The provider stores them in the Terraform state as sensitive values, and it keeps the provider secrets and the mail password you give it there too, because the API never returns them. Keep the state in a backend that is encrypted and access-controlled, and write generated credentials to a secret store from the configuration instead of printing them.
For AI assistants
The provider repository has an llms.txt that lists its reference pages, and this site's llms.txt lists these pages. To create the token the provider needs, or to work on the same objects without Terraform, see For AI agents and the management API.
Help and bugs
Open an issue or a discussion in the repository; report a security problem as described in its security policy, not in a public issue.