1 Resources oauth_picture_links
Forgejo Actions edited this page 2026-11-27 04:00:16 +00:00

openwebui_oauth_picture_links (Resource)

Sets every user signed in through one OAuth provider to use that provider's picture URL (url_template with {sub} replaced by the user's subject) and turns off OAUTH_UPDATE_PICTURE_ON_LOGIN, which would otherwise overwrite it at the next sign-in. Only profile_image_url of OAuth users and that one OAuth setting are written; names, emails, roles and local users are untouched. Users who sign in for the first time after an apply are linked by the next apply. Destroying the resource leaves pictures and the setting as they are.

Example Usage

# Pocket ID: show each user's Pocket ID picture in Open WebUI. Open WebUI stores
# the link and the browser loads the picture; nothing is copied at sign-in.
resource "openwebui_oauth_picture_links" "pocket_id" {
  provider_name = "oidc"
  url_template  = "https://auth.example.com/api/users/{sub}/profile-picture.png"
}

Schema

Required

  • provider_name (String) OAuth provider key in the user record, e.g. oidc.
  • url_template (String) https URL with {sub}, e.g. https://auth.example/api/users/{sub}/profile-picture.png (Pocket ID).

Read-Only

  • id (String) The provider name.
  • users_linked (Number) OAuth users found.
  • users_out_of_sync (Number) OAuth users whose picture is not their link, plus one if copy-on-login is on. Planned as 0.

Import

Import is supported using the following syntax:

The terraform import command can be used, for example:

# The OAuth provider key in the user record.
tofu import openwebui_oauth_picture_links.pocket_id oidc