Managing resource tags and access policies requires LangSmith Terraform provider v0.0.6 or later.
Before diving in, it might be helpful to read:
Install and configure
Add the provider to your Terraform configuration and pin a version:terraform init to download the provider.
Authentication
The provider resolves credentials the same way as the LangSmith SDK and CLI. Prefer environment variables or a profile over hardcodingapi_key:
- Environment—
LANGSMITH_API_KEY,LANGSMITH_ENDPOINT(API URL),LANGSMITH_WORKSPACE_ID. - Profile—set
profile(orLANGSMITH_PROFILE) to use a LangSmith CLI profile. - Provider arguments—
api_key,api_url,workspace_id,profile.
Examples
Create a workspace
Manage roles and members
Look up built-in roles with data sources, then assign them. This invites a user to the organization and grants them admin on the workspace:Manage resource tags and access policies
Use resource tags to organize workspace resources and apply attribute-based access control (ABAC). Thelangsmith_tag convenience resource owns one tag key and one value. Use the independent langsmith_tag_key and langsmith_tag_value resources when keys or values are shared across configurations.
The following configuration creates an Environment=production tag, applies it to a tracing project, and limits a workspace role to production projects:
Automate evaluators, run rules, and alerts
The provider manages more than accounts. You can codify online code evaluators, the run rules that apply them, and alerts alongside your workspaces:Resource reference
The full list of resources and data sources—with every argument and attribute—is published and kept in sync on the Terraform Registry:LangSmith provider on the Terraform Registry
Browse the complete reference for all resources and data sources.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

