This documentation is maintained in GitLab and published to OneWiki. Any Changes made in OneWiki directly will be over written.
Simple
module "usr_mgmt" {
  source     = "../.."
  url        = "<LITELLM_URL>"
  token      = "<LITELLM_TOKEN>"
  user_id    = "<USER_ID>"
  user_email = "<USER_EMAIL>"
  max_budget = 15
  models     = [
    "list", 
    "of", 
    "models"
  ]
}
# Available User Outputs
output "timtim" {
  value = module.usr_mgmt.user_response
}
output "timtim_data" {
  value = module.usr_mgmt.user_data
}
# Available Key Outputs
output "key" {
  value = module.usr_mgmt.key
}
output "key_data" {
  value = module.usr_mgmt.key_data
}
output "key_res" {
  value = module.usr_mgmt.key_response
}| Name | Description | Type | Default | Required | 
|---|---|---|---|---|
| auto_create_key | Should a key be created for the user durring user creation | bool | 
false | 
no | 
| budget_duration | Budget duration befor reseting. | string | 
"30d" | 
no | 
| duration | Howlong the key should last before expiring | string | 
"365d" | 
no | 
| key_alias | Alias for the user provided key | string | 
null | 
no | 
| max_budget | Maximum monthly budget assigned to the user and there personal keys | number | 
0 | 
no | 
| max_parallel_requests | Maximum parallel requests that a user/key can perform | number | 
100 | 
no | 
| metadata | Metadata to assign to USER/KEY | map(string) | 
{} | 
no | 
| model_max_budget | n/a | map(string) | 
{} | 
no | 
| models | Models assigned directly to the user and there personal keys | list(string) | 
[  | 
no | 
| rpm_limit | Requests per minute for the user and there personal keys | number | 
1000 | 
no | 
| spend | Set how much has been spent by the USER/KEY | number | 
0 | 
no | 
| team_id | Team ID to assign to USER/KEY | string | 
null | 
no | 
| token | Token issued from AI Gateway with permission to create/add users | string | 
n/a | yes | 
| tpm_limit | Tokens per minute for the user and there personal keys | number | 
100000 | 
no | 
| url | URL for Litellm | string | 
n/a | yes | 
| user_alias | Alias for the user | string | 
null | 
no | 
| user_email | email address for user EPPN | string | 
n/a | yes | 
| user_id | EPPN for user | string | 
n/a | yes | 
| user_max_budget | Maximum monthly budget assigned to the user and there personal keys | number | 
0 | 
no | 
| user_models | Models assigned directly to the user and there personal keys | list(string) | 
[  | 
no | 
| user_role | Specify a user role - 'admin', 'app_owner', 'app_user' | string | 
"app_user" | 
no | 
| Name | Source | Version | 
|---|---|---|
| key_mgmt | ./modules/key | n/a | 
| user_mgmt | ./modules/user | n/a | 
| Name | Description | 
|---|---|
| key | n/a | 
| key_data | n/a | 
| key_response | n/a | 
| user_data | n/a | 
| user_response | n/a | 
No providers.
Below is an example of how to configure the provider.
/* -------------------------------------------------------------------------- */
/*                             INCLUEDED IN MODULE                            */
/* -------------------------------------------------------------------------- */
/* ----------------------------- NOT NEEDED HERE ---------------------------- */| Name | Version | 
|---|---|
| restapi | 1.19.1 | 
| terracurl | 1.2.1 | 
Below is an example of how to configure the requirements.
terraform {
  required_providers {
    restapi = {
      source  = "Mastercard/restapi"
      version = "1.19.1"
    }
    terracurl = {
      source  = "devops-rob/terracurl"
      version = "1.2.1"
    }
  }
}No resources.