Skip to content

Integrations

Configure Slack, AWS, and AI providers from the CLI.

Slack Integration

Get notified about drifts and scans in Slack.

Setup

bash
controlinfra slack setup

You'll be prompted to enter your Slack webhook URL:

? Enter your Slack webhook URL: https://hooks.slack.com/services/...
✓ Slack integration configured

Test with: controlinfra slack test

Or provide it directly:

bash
controlinfra slack setup --webhook https://hooks.slack.com/services/...

Test

Send a test message:

bash
controlinfra slack test

Output:

✓ Test message sent to Slack

Status

Check integration status:

bash
controlinfra slack status

Output:

┌──────────────────────────────────────────────────────────┐
│ Slack Integration                                         │
├──────────────────────────────────────────────────────────┤
│ Status:    Connected                                      │
│ Webhook:   https://hooks.slack.com/*****/***              │
└──────────────────────────────────────────────────────────┘

Remove

Remove Slack integration:

bash
controlinfra slack remove

AWS Credentials

Configure AWS credentials for drift scanning.

Setup

bash
controlinfra aws setup

Interactive mode:

  AWS Credentials Setup

  These credentials are used to access your AWS account for drift detection.

? AWS Access Key ID: AKIA...
? AWS Secret Access Key: ****
? Default AWS Region: us-east-1
✓ AWS credentials saved

Test credentials with: controlinfra aws test

Or provide directly:

bash
controlinfra aws setup \
  --access-key AKIAIOSFODNN7EXAMPLE \
  --secret-key wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY \
  --region us-east-1

Test

Validate credentials:

bash
controlinfra aws test

Output:

✓ AWS credentials are configured

Credentials will be validated during the next scan.

Status

Check credential status:

bash
controlinfra aws status

Output:

┌──────────────────────────────────────────────────────────┐
│ AWS Credentials                                           │
├──────────────────────────────────────────────────────────┤
│ Status:      Configured                                   │
│ Access Key:  AKIA****MPLE                                 │
│ Region:      us-east-1                                    │
└──────────────────────────────────────────────────────────┘

Remove

Remove AWS credentials:

bash
controlinfra aws remove

AI Provider (BYOK)

Use your own AI provider API keys instead of the default.

Supported Providers

ProviderModels
AnthropicClaude 3.5 Sonnet, Claude 3 Opus
OpenAIGPT-4, GPT-4 Turbo

Status

Check current AI provider:

bash
controlinfra ai status

Output:

┌──────────────────────────────────────────────────────────┐
│ AI Provider                                               │
├──────────────────────────────────────────────────────────┤
│ Provider:     default                                     │
│ Custom Key:   No (using default)                          │
└──────────────────────────────────────────────────────────┘

Use your own API key with:
  controlinfra ai use anthropic --key <your-api-key>
  controlinfra ai use openai --key <your-api-key>

Use Anthropic

bash
controlinfra ai use anthropic --key sk-ant-...

Interactive mode:

bash
controlinfra ai use anthropic
? Enter your anthropic API key: ****
✓ API key verified
✓ anthropic configured as AI provider

AI-powered features will now use your API key.

Use OpenAI

bash
controlinfra ai use openai --key sk-...

Verify

Check if your API key is valid:

bash
controlinfra ai verify

Output:

✓ anthropic API key is valid

Remove (Use Default)

Revert to using the default Controlinfra AI:

bash
controlinfra ai remove
? Remove custom AI key and use default Controlinfra AI? Yes
✓ Custom AI key removed

Now using default Controlinfra AI.

Environment Variables

All integrations can be configured via environment variables:

VariableDescription
CONTROLINFRA_TOKENAuthentication token
CONTROLINFRA_API_URLCustom API URL
AWS_ACCESS_KEY_IDAWS access key
AWS_SECRET_ACCESS_KEYAWS secret key
AWS_REGIONAWS region
ANTHROPIC_API_KEYAnthropic API key
OPENAI_API_KEYOpenAI API key

Next Steps

AI-powered infrastructure drift detection