feat: allow deletion of ressources via blueprints
This commit is contained in:
parent
f8b9975ae4
commit
3d3a09025a
4 changed files with 70 additions and 2 deletions
|
|
@ -0,0 +1,38 @@
|
|||
# yaml-language-server: $schema=https://goauthentik.io/blueprints/schema.json
|
||||
version: 1
|
||||
metadata:
|
||||
name: "cleanup"
|
||||
labels:
|
||||
blueprints.goauthentik.io/instantiate: "true"
|
||||
blueprints.goauthentik.io/description: "Remove stale resources"
|
||||
|
||||
entries:
|
||||
{% for slug in authentik_removed_oidc_apps %}
|
||||
# Remove OIDC app: {{ slug }}
|
||||
- model: authentik_core.application
|
||||
state: absent
|
||||
identifiers:
|
||||
slug: {{ slug }}
|
||||
- model: authentik_providers_oauth2.oauth2provider
|
||||
state: absent
|
||||
identifiers:
|
||||
name: {{ slug }}
|
||||
{% endfor %}
|
||||
{% for slug in authentik_removed_proxy_apps %}
|
||||
# Remove proxy app: {{ slug }}
|
||||
- model: authentik_core.application
|
||||
state: absent
|
||||
identifiers:
|
||||
slug: {{ slug }}
|
||||
- model: authentik_providers_proxy.proxyprovider
|
||||
state: absent
|
||||
identifiers:
|
||||
name: {{ slug }}
|
||||
{% endfor %}
|
||||
{% for username in authentik_removed_local_users %}
|
||||
# Remove user: {{ username }}
|
||||
- model: authentik_core.user
|
||||
state: absent
|
||||
identifiers:
|
||||
username: {{ username }}
|
||||
{% endfor %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue