Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force default override on authentik_tenant? #94

Open
patoarvizu opened this issue Jan 29, 2022 · 2 comments
Open

Force default override on authentik_tenant? #94

patoarvizu opened this issue Jan 29, 2022 · 2 comments

Comments

@patoarvizu
Copy link

I would like to create a new tenant with Terraform and have that one be the default one instead of authentik-default without having to manually mark it as the non-default (or having to terraform import it). Right now if I try to do it, I get an error saying that only one tenant can be the default, and Terraform refuses to create the resource.

Would it be possible to either make the behavior of default = true such that if only authentik-default exists the provider makes the new one the default OR to have an explicit force_default field that will trigger this behavior?

I know that the behavior can get a little more complicated when having more than one non-default tenants and I'm not sure how that could be handled. Maybe just documenting that you can only use default = true (or force_default = true) on one authentik_tenant instance, and/or use ignore_changes on all the other ones?

@l-with
Copy link
Contributor

l-with commented Jul 19, 2022

An alternative would be an environment variable for docker-compose to choose if the tenant "authentik-default" should be default. The default could be true. This would keep everything as infrastructure-as-code.

@l-with
Copy link
Contributor

l-with commented Jul 20, 2022

I implemented a simple terraform module to make it possible to change the default value of the authentik-default tenant: https://registry.terraform.io/modules/l-with/authentik-tenant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants