Just created a terraform provider for managing configuration of directus.
It’s on very early stages, mostly written as PoC with chatgpt, but it’s already very usefull on our simple production project.
We will be happy to make things happen faster, so opening doors to everyone who is willing to contribute.
you can try to create policies and roles already with it
terraform {
required_providers {
directus = {
source = “soft-techies-com/directus”
version = “0.1.4"
}
}
}
resource "directus_file" "logo" {
type = "image/png"
title = "logo"
storage = "local"
filename_disk = "logo.png"
filename_download = "logo.png"
metadata = jsonencode({})
filesize = 6547
width = 256
height = 241
}
resource "directus_setting" "instance" {
project_name = "Example"
project_url = "http://example.com"
public_note = "Example | Example Management Panel"
project_logo = directus_file.logo.id
project_color = "#FFFFFF"
project_descriptor = "Example Management Panel"
public_favicon = directus_file.logo.id
public_registration = false
public_registration_verify_email = true
default_language = "en-US"
accepted_terms = true
auth_login_attempts = 25
default_appearance = "auto"
default_theme_light = "Directus Default"
storage_asset_transform = "all"
}