setup

Modal

Purpose

Collects Modal workspaces, identities, environments, applications, functions, sandboxes, images, secrets metadata, storage, queues, proxies, and custom domains.

tip

Secret fields below accept either an AWS Secrets Manager ARN or a value pasted directly into SubImage's managed vault. See Secrets for details.

Required Fields

Field Secret? Description
modal_token_id No Modal API token ID beginning with ak-
modal_token_secret Yes Modal API token secret beginning with as-

Optional Fields

Field Description
modal_environments Environment names to inventory. All environments are inventoried by default.

Setup Steps

  1. In the Modal dashboard, open Settings / API Tokens, or run modal token new.
  2. Copy the token ID and token secret. The secret is shown only once.
  3. In SubImage, enter the values in modal_token_id and modal_token_secret.
  4. To limit environment contents, enter the environment names in modal_environments.
  5. Save the module and run a sync.

Notes

Modal does not provide read-only API tokens. Prefer a dedicated service user with the viewer role on the environments you want to inventory. Modal does not return secret values through its read APIs, so only secret metadata is collected.