Manage private auth resources with Terraform#603
Merged
Conversation
Collaborator
Author
|
This change is part of the following stack: Change managed by git-spice. |
This was referenced Jul 3, 2026
39a8814 to
09f4404
Compare
ae3fa3f to
5f0d350
Compare
Manage Authentik objects declaratively without letting OpenTofu download provider binaries outside the Nix-managed toolchain.
Nginx forward auth fails closed when the embedded outpost lacks matching proxy providers, leaving private dashboards with runtime 500s. Declare the protected applications, group bindings, and outpost attachments so Authentik policy stays in sync with the tailnet ingress configuration.
Keep Authentik and Headscale authorization derived from the same user inventory so group membership changes do not depend on a separate sync service. Terraform owns Headscale users and the database policy, while SOPS keeps API credentials and user PII encrypted.
Parallel Terragrunt stack plans can briefly contend for PostgreSQL backend locks. Make OpenTofu wait instead of failing immediately so running plan across all Terraform modules is reliable.
Headscale, Nextcloud, and Vaultwarden depend on manually configured Authentik OIDC clients. Move those clients and their group claim mappings into Terraform, and make the services consume the same SOPS-managed client secrets so Authentik and Nix converge from one source.
5f0d350 to
0f7eeca
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move Authentik forward-auth resources, Headscale users/policy, and OIDC client metadata into Terraform.
Highlights:
status.sjanglab.orgvisible in the Authentik dashboard as a launch-only application without protecting the page.Depends on #602.