{% extends "base.html" %} {% block title %}Settings{% endblock %} {% block content %}
Snapshots, the IP list, the Visual page and suggestions always show the active account (selector in the top bar). Rules are shared and can be limited to one account.
| Account | Region | Auth | Credentials | Scheduled refresh | |
|---|---|---|---|---|---|
| {{ c.label }}
{% if active_account and a.id == active_account.id %}active{% endif %}
{% if a.aws_account_id %} AWS {{ a.aws_account_id }} {% endif %}
{% if a.identity_warning %}Warning: {{ a.identity_warning }} {% endif %} |
{{ a.region }} | {{ a.mode_label }}{% if a.auth_mode == 'profile' %} {{ a.profile }}{% endif %} | {% if a.auth_mode == 'env' %}process environment {% elif a.auth_mode == 'profile' %}~/.aws profile {% else %} {% if a.access_key_id %}{{ a.access_key_id }}{% endif %} {% if a.memory_only %}memory only{% else %}encrypted{% endif %} {% if a.problem %}{{ a.problem }} {% elif a.auth_mode == 'temporary' %}{{ a.status }}{% endif %} {% endif %} | Edit | |
| No accounts yet — add one. | |||||
Test calls sts:GetCallerIdentity and ec2:DescribeVpcs with the account's saved credentials. A scheduled refresh runs while IPLens is running, as a background job like the Refresh button (skipped while the account already has a job running).
After each Refresh, every subnet of the account is checked against the thresholds below, and subnets whose alert state changed are posted to a webhook as one JSON message in the chosen webhook format. A subnet is only sent again when its state changes (including one "resolved" line when it clears), so repeated Refreshes do not repeat an alert. A failed send is logged, never fails the Refresh, and is retried after the next one. This webhook POST is the only outbound call IPLens makes besides AWS.
{{ text }}
Serves the read-only iplens mcp tools (subnet usage, headroom, IP lookup, snapshot diffs, fit check) over Streamable HTTP to editors and AI assistants. It runs as a separate process started by IPLens, reads the local database only and never calls AWS. Every request needs the bearer token below; requests from a browser page of another origin are rejected.
{% if not mcp.enabled %}| Status | {{ st.state }} {% if st.retries %}retry {{ st.retries }}/{{ st.max_retries }}{% endif %} |
|---|---|
| PID | {{ st.pid or '—' }} |
| URL | {{ st.url or mcp.url }} |
| Uptime | {{ st.uptime_text or '—' }} |
| Last error | {{ st.last_error or '—' }} |
| Log | MCP server log {{ st.log_file }} |
A token is set encrypted — it is shown only when generated; regenerate it if you lost it.
{% else %}No token yet: one is generated on the first start (or now).
{% endif %}Encrypted at rest like the account credentials. The server process gets it in its environment, never on its command line.
VS Code — .vscode/mcp.json (VS Code asks for the token once and keeps it):
{{ snippet('mcp-vscode', mcp_vscode) }}Claude Code — set {{ mcp_token_env }} to the token in your shell first (it is expanded there, so it stays out of the shell history):
{{ snippet('mcp-claude', mcp_claude) }}stdio alternative — no HTTP server and no token: the client starts iplens mcp itself (on this machine).
{{ snippet('mcp-stdio-vscode', mcp_stdio.vscode) }} {{ snippet('mcp-stdio-claude', mcp_stdio.claude) }}Load one or more .tfstate files or terraform show -json outputs, each as a named root. IPLens reads them locally and never modifies them. Only resource ids, addresses and types are kept (for {{ tf_types | join(', ') }}); attribute values, outputs and sensitive data are discarded while reading. The IP List, ENI pages and the Visual page then show which root manages each resource.
| Root | Source | Resource ids | Loaded | |
|---|---|---|---|---|
| {{ r.name }} | {{ r.source }}{% if r.origin == 'repo' %} repo sync{% elif not r.source_path %} upload{% endif %} | {{ r.resources }} | {{ r.loaded_at | localtime }} | {% if r.source_path %} {% endif %} |
| No Terraform roots loaded. | ||||
Add a local Terraform repository. IPLens scans its .tf / .tfvars files (without running terraform) for roots, environments (env folders, *.tfvars, workspaces) and backends, and guesses each environment's AWS account. After you confirm the mapping, Sync (and every Refresh of a mapped account) runs only terraform init -input=false -lockfile=readonly, terraform workspace select and terraform show -json with the mapped account's credentials and TF_DATA_DIR in the IPLens data directory: the repository is never modified, and plan / apply / import are never run. Only resource ids, addresses and types are kept. See Ownership for sync status and drift. Terraform is an optional ownership source: enable the Terraform enrichment under Ownership to use it (and to re-sync mapped repos with every Refresh).
| Repository | Roots | Root × env | Synced pairs | Scanned | |
|---|---|---|---|---|---|
| {{ p.path }} | {{ p.roots }} | {{ p.envs }} | {{ p.confirmed }} | {{ p.discovered_at | localtime }} | Review mapping |
| No Terraform repos added. | |||||