~/.crust.json. This guide explains all available configuration options.
Configuration File
The configuration file is created when you runcrust init. Here’s an example of a complete configuration:
Configuration Options
openaiKey
Your OpenAI API key. This is required for security analysis and plan explanation. Can be overridden with the --openai-api-key command line option.
terraformPlanCommand
The command used to generate the Terraform plan. This command should output the plan to stdout. Can be overridden with the --terraform-plan-command command line option.
language
The language for plan explanations. All languages are available. Can be overridden with the --language command line option.
Command Line Options
All configuration options can be overridden using command line options:Initial Configuration
To create or update your configuration:- Create or update the configuration file
- Ask for your OpenAI API key
- Ask for your preferred Terraform plan command
- Ask for your preferred language
Best Practices
- Keep your OpenAI API key secure: Don’t share your configuration file
- Use appropriate Terraform plan command: Make sure it outputs to stdout
- Choose your preferred language: Select the language you’re most comfortable with
Example Configurations
Basic Configuration
Global Configuration
Crust can be configured globally through a configuration file.Configuration File
The default configuration file is located at~/.crust/config.json.
Example configuration: