Integrating Terraform with Drata automates your user access reviews, saving time and reducing errors by syncing user data directly from Terraform.
Key Capabilities
Automated user access reviews: Continuously pulls user and role data from Terraform to verify access controls.
Evidence collection: Simplifies audit readiness by automatically gathering Terraform user access evidence.
Reduced manual effort: Keeps user records synchronized with Drata for seamless compliance reporting.
Prerequisites & Data Access
Must have Admin privileges within your Terraform organization.
Must have your Terraform Organization Name.
Must create a Terraform API Key with no expiration.
If your organization uses a Web Application Firewall (WAF), ensure Drata’s IP addresses are allowlisted.
Permissions & Data Table
Permission/Scope | Why It’s Needed | Data Accessed (Read Only) |
Organization Name | Identifies the Terraform organization to sync | Organization metadata and workspace details |
API Key | Authenticates Drata’s access to Terraform | User and role data within Terraform workspaces |
Step-by-Step Setup
Step 1: Copy Your Terraform Organization Name
Log in to your Terraform instance.
Navigate to the Workspaces page.
Copy your Organization Name from the URL (https://app.terraform.io/app/{Organization_Name}/workspaces) or from the Workspace page header.
Step 2: Create a Terraform API Key
Click your profile icon in the left-side navigation.
Select Account Settings.
In the left menu, choose Tokens (under Account Settings).
Click Create API Token.
Enter a description, set the Expiration to No expiration, and generate the token.
Copy your Terraform API key. You will need this to connect to Drata.
Complete the Connection
In Drata’s Connections page, enter the following information:
Drata Field | Terraform Value |
Organization Name | The Terraform organization name from the Workspaces page |
API Key | The Terraform API key generated under Account Settings → Tokens |
For steps on accessing and using the Connections page in Drata, refer to The Connections Page in Drata.