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
- In the Modal dashboard, open Settings / API Tokens, or run
modal token new. - Copy the token ID and token secret. The secret is shown only once.
- In SubImage, enter the values in
modal_token_idandmodal_token_secret. - To limit environment contents, enter the environment names in
modal_environments. - 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.