Aikido Terraform Provider
Use the official Aikido Terraform provider to manage Aikido resources as code through the management API. This is useful if you already provision infrastructure with Terraform and want repository activation, AutoFix settings, and PR checks to follow the same workflow.
Full resource schemas, arguments, and import syntax live in the Terraform Registry documentation.
What you can manage
The provider currently supports:
Repositories: Activate or deactivate existing code repositories, and set sensitivity, connectivity, and labels
AutoFix settings: Configure workspace AutoFix for dependencies, SAST, and Aikido Pentest findings
PR checks: Configure pull request gating per repository (severity thresholds, scan types, inline comments, Deep Review)
Requirements
Terraform 1.0 or later
An Aikido workspace with API access
OAuth2 client credentials from the Aikido REST API integration page
Set up the provider
Create API credentials
Go to the Aikido REST API integration page.
Create a client ID and client secret.
Store the secret securely. You will not be able to view it again after you leave the page.
See the API authorization docs for more detail on how Aikido authenticates API clients.
Declare the provider
Add the provider to your Terraform configuration, then run terraform init:
terraform {
required_providers {
aikido = {
source = "AikidoTerraform/aikido"
version = "~> 1.1"
}
}
}
provider "aikido" {
client_id = var.aikido_client_id
client_secret = var.aikido_client_secret
}You can also pass credentials with environment variables instead of hardcoding them:
AIKIDO_CLIENT_IDAIKIDO_CLIENT_SECRET
When those are set, you can use an empty provider block:
provider "aikido" {}Target your Aikido region (optional)
By default, the provider uses the EU API (https://app.aikido.dev/api). If your workspace is hosted in another region, set base_url (or the AIKIDO_BASE_URL environment variable) to match the app URL you use to log in:
Aikido login URL
Example base_url
app.aikido.dev
https://app.aikido.dev/api (default)
app.us.aikido.dev
https://app.us.aikido.dev/api
app.au.aikido.dev
https://app.au.aikido.dev/api
app.me.aikido.dev
https://app.me.aikido.dev/api
provider "aikido" {
client_id = var.aikido_client_id
client_secret = var.aikido_client_secret
base_url = "https://app.us.aikido.dev/api"
}Example configuration
For every argument, import ID, and resource-specific behavior, use the official docs:
Related docs
Last updated
Was this helpful?