The provider command group manages your connected cloud accounts. Use it to add new accounts, trigger resource syncs, check sync status, and remove accounts you no longer need.
provider list
List all connected cloud provider accounts:
Example output:
ID NAME TYPE STATUS LAST SYNC
-- ---- ---- ------ ---------
1 production aws active 2 minutes ago
2 dev-project gcp active 1 hour ago
provider connect
Connect a new cloud provider account. The CLI prompts interactively for credentials if flags are not provided.
Synopsis:
infraudit provider connect <aws|gcp|azure> [flags]
infraudit provider connect aws
# > AWS Access Key ID: AKIA...
# > AWS Secret Access Key: ********
# > AWS Region [us-east-1]: us-west-2
infraudit provider connect gcp
# > GCP Project ID: my-project
# > Path to service account JSON: /path/to/key.json
infraudit provider connect azure
# > Azure Tenant ID: ...
# > Azure Client ID: ...
# > Azure Client Secret: ********
# > Azure Subscription ID: ...
Flags available for non-interactive use:
| Flag | Description |
|---|
--type | Provider type: aws, gcp, or azure |
--name | Display name for the provider |
--credentials | Path to a credentials file (JSON for GCP service accounts) |
provider sync
Trigger a manual resource sync from a connected provider. InfraAudit pulls the current resource inventory from the cloud account and updates the database.
Synopsis:
infraudit provider sync <provider-id>
Example:
infraudit provider sync 1
# Syncing resources...
# Sync complete: 47 found, 12 created, 35 updated
provider status
Show the sync status for all connected providers:
infraudit provider status
provider disconnect
Remove a provider account from InfraAudit. Credential data is deleted; historical scan data and findings are retained.
Synopsis:
infraudit provider disconnect <provider-id>
Example:
infraudit provider disconnect 1
Disconnecting a provider removes its credentials from InfraAudit permanently. Historical data is preserved, but no new syncs or scans can run against that account until you reconnect it.