Skip to content

nf discover resources

Discover live resources from a specific discovery provider.

Synopsis

nf discover resources <provider> [OPTIONS]

Common Options

  • --resource-types TEXT: restrict discovery to one or more resource types
  • --json: emit full JSON output
  • --limit INTEGER: limit the number of resource types discovered when no explicit types are given

Provider-Specific Options

AWS:

  • --region TEXT
  • --profile TEXT
  • --grafana-token-file WORKSPACE_ID=FILE: an existing service-account token file for legacy Grafana API-key metadata; repeat for each workspace

GitLab:

  • --url TEXT
  • --token TEXT

Keycloak:

  • --url TEXT
  • --username TEXT
  • --password TEXT
  • --client-id TEXT
  • --client-secret TEXT

Behavior

If you do not pass --resource-types, Netherframe asks the provider for all supported discoverable types. It then validates the provider config and runs the discovery asynchronously.

Table output is summarized for readability. Use --json when you need the full result set and resource attributes.

An explicitly requested declaration with no live inventory produces an availability notice with its resource type, category and reason. JSON includes these under notices, including when resources is empty. Requests containing only these declarations need no AWS credentials or API calls; mixed requests continue discovering the supported types. Counts include actual discovered resources only.

Legacy Grafana API-key inventory uses existing token files only for the explicitly named workspaces. It verifies workspace metadata through AWS, then reads the documented Grafana version-10 administrative key listing over verified HTTPS. The key secrets and authentication tokens are never returned. The original required key TTL remains an argument to supply, and this provider resource has no native importer. A saturated 100-key response reports incomplete inventory because the endpoint has no pagination.

Lex V1 readers are limited to GovCloud West (us-gov-west-1) through the SDK's FIPS endpoint, following the current AWS GovCloud availability guide and FIPS catalog. They require successful administrative List/Get responses; the general retirement notice is retained in their guidance. Other regions make no Lex inventory calls. Required definitions withheld from output and original creation choices remain explicit arguments to supply.

Some provider configuration resources have no native importer. Their table entry shows import as not supported; JSON includes native_import_supported: false and keeps import_id as a logical inventory identity. Folding those resources emits their configuration without an import block, even with automatic import enabled, and reports that applying uses the resource's creation behavior. Review that behavior before applying account settings or policies.

Examples

nf discover resources aws --region us-east-1
nf discover resources aws --resource-types aws_s3_bucket --resource-types aws_vpc
nf discover resources aws --region us-east-1 --resource-types aws_grafana_workspace_api_key \
  --grafana-token-file g-0123456789=/run/secrets/grafana-service-account-token
nf discover resources aws --region us-gov-west-1 --resource-types aws_lex_bot
nf discover resources gitlab --url https://gitlab.com --token "$GITLAB_TOKEN"
nf discover resources keycloak --url http://localhost:8080 --username admin --password admin