Git Product home page Git Product logo

terraform-module-authentik-tenant's Introduction

terraform-module-authentik-tenant

Terraform module which configures the default authentik tenant.

Authentik comes with predefined resources. The anchor is the default tenant, which is marked as to be used for each domain that doesn't have a dedicated tenant.

As a consequence the terraform-provider authentik can not create a new tenant to be used for each domain that doesn't have a dedicated tenant, since there could only be one tenant with this characteristic.

This module changes the default tenant by a direct API call by local-exec in a null_resource.

The following code changes the default tenant to not be used for each domain that doesn't have a dedicated tenant.

module "tenant" {
  source                   = "l-with/authentik-tenant/module"
  version                  = ">= 0.0.3"
  authentik_url            = var.authentik_url
  authentik_token          = var.authentik_bootstrap_token
  authentik_tenant_default = false
}

The tenant is selected by the input variable authentik_tenant_domain which default value is "authentik-default".

The module provides an output value authentik_module_tenant_dummy that depends on the null_resource with the local-exec. The value is "". You can use it to create an implicit dependency in every resource with a string value, for example a new resource authentik_tenant:

resource "authentik_tenant" "default" {
  domain           =  "${module.tenant.authentik_module_tenant_dummy}."
  default          = true
  branding_logo    = "/static/dist/assets/icons/icon_left_brand.svg"
  branding_favicon = "/static/dist/assets/icons/icon.png"
}

terraform-module-authentik-tenant's People

Contributors

l-with avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

terraform-module-authentik-tenant's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.