> ## Documentation Index
> Fetch the complete documentation index at: https://docs.infraudit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# infraudit provider — cloud provider account management

> infraudit provider — connect, sync, and disconnect AWS, GCP, and Azure accounts. Key flags: --type, --name, --credentials for provider connect.

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:

```bash theme={null}
infraudit provider list
```

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:**

```bash theme={null}
infraudit provider connect <aws|gcp|azure> [flags]
```

<Tabs>
  <Tab title="AWS">
    ```bash theme={null}
    infraudit provider connect aws
    # > AWS Access Key ID: AKIA...
    # > AWS Secret Access Key: ********
    # > AWS Region [us-east-1]: us-west-2
    ```
  </Tab>

  <Tab title="GCP">
    ```bash theme={null}
    infraudit provider connect gcp
    # > GCP Project ID: my-project
    # > Path to service account JSON: /path/to/key.json
    ```
  </Tab>

  <Tab title="Azure">
    ```bash theme={null}
    infraudit provider connect azure
    # > Azure Tenant ID: ...
    # > Azure Client ID: ...
    # > Azure Client Secret: ********
    # > Azure Subscription ID: ...
    ```
  </Tab>
</Tabs>

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:**

```bash theme={null}
infraudit provider sync <provider-id>
```

Example:

```bash theme={null}
infraudit provider sync 1
# Syncing resources...
# Sync complete: 47 found, 12 created, 35 updated
```

## `provider status`

Show the sync status for all connected providers:

```bash theme={null}
infraudit provider status
```

## `provider disconnect`

Remove a provider account from InfraAudit. Credential data is deleted; historical scan data and findings are retained.

**Synopsis:**

```bash theme={null}
infraudit provider disconnect <provider-id>
```

Example:

```bash theme={null}
infraudit provider disconnect 1
```

<Warning>
  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.
</Warning>
