Integrations
Configure Slack, AWS, and AI providers from the CLI.
Slack Integration
Get notified about drifts and scans in Slack.
Setup
bash
controlinfra slack setupYou'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 testOr provide it directly:
bash
controlinfra slack setup --webhook https://hooks.slack.com/services/...Test
Send a test message:
bash
controlinfra slack testOutput:
✓ Test message sent to SlackStatus
Check integration status:
bash
controlinfra slack statusOutput:
┌──────────────────────────────────────────────────────────┐
│ Slack Integration │
├──────────────────────────────────────────────────────────┤
│ Status: Connected │
│ Webhook: https://hooks.slack.com/*****/*** │
└──────────────────────────────────────────────────────────┘Remove
Remove Slack integration:
bash
controlinfra slack removeAWS Credentials
Configure AWS credentials for drift scanning.
Setup
bash
controlinfra aws setupInteractive 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 testOr provide directly:
bash
controlinfra aws setup \
--access-key AKIAIOSFODNN7EXAMPLE \
--secret-key wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY \
--region us-east-1Test
Validate credentials:
bash
controlinfra aws testOutput:
✓ AWS credentials are configured
Credentials will be validated during the next scan.Status
Check credential status:
bash
controlinfra aws statusOutput:
┌──────────────────────────────────────────────────────────┐
│ AWS Credentials │
├──────────────────────────────────────────────────────────┤
│ Status: Configured │
│ Access Key: AKIA****MPLE │
│ Region: us-east-1 │
└──────────────────────────────────────────────────────────┘Remove
Remove AWS credentials:
bash
controlinfra aws removeAI Provider (BYOK)
Use your own AI provider API keys instead of the default.
Supported Providers
| Provider | Models |
|---|---|
| Anthropic | Claude 3.5 Sonnet, Claude 3 Opus |
| OpenAI | GPT-4, GPT-4 Turbo |
Status
Check current AI provider:
bash
controlinfra ai statusOutput:
┌──────────────────────────────────────────────────────────┐
│ 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 verifyOutput:
✓ anthropic API key is validRemove (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:
| Variable | Description |
|---|---|
CONTROLINFRA_TOKEN | Authentication token |
CONTROLINFRA_API_URL | Custom API URL |
AWS_ACCESS_KEY_ID | AWS access key |
AWS_SECRET_ACCESS_KEY | AWS secret key |
AWS_REGION | AWS region |
ANTHROPIC_API_KEY | Anthropic API key |
OPENAI_API_KEY | OpenAI API key |
Next Steps
- Quick Reference - Command overview
- Runners - Self-hosted runners