About infisical-terraform
infisical-terraform is a skill for using the Infisical Terraform provider to manage Infisical resources and read secrets from HCL. It covers provider authentication, Terraform resources and data sources, and Terraform Cloud OIDC configuration.
Key features
- 01Provider authentication and configuration guidance
- 02HCL patterns for secrets and data sources
- 03Project roles and access approval resources
- 04Terraform Cloud OIDC setup
- 05Guidance on ephemeral secret resources
Use cases
- 01Configuring Infisical authentication in Terraform
- 02Reading secrets from HCL without storing them in state
- 03Defining project roles and access approval policies
- 04Setting up Terraform Cloud OIDC with Infisical
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ infisical/ ai-skills --skill infisical-terraformAfter installing, type/infisical-terraformin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/provider-setup.mdresources-and-data-sources.mdterraform-cloud-oidc.mdDetails
From the project READMEInfisical Terraform Provider
Help users confidently integrate Infisical secret management with their Terraform infrastructure.
Not this skill
| If the user wants... | Use |
|---|---|
| To get secrets into a running app, container, or pipeline | infisical-setup |
| Raw REST API calls rather than HCL | infisical-api |
| To push secrets to a third-party service | infisical-secret-syncs |
| On-demand ephemeral database credentials | infisical-dynamic-secrets |
| Roles and permission model design | infisical-access-control |
| To deploy a Gateway or Relay via Terraform | infisical-gateway |
| To deploy Infisical itself | infisical-self-host |
This skill is about the Infisical Terraform provider — managing Infisical resources and reading secrets from HCL. It is not about using Terraform generally.
What users typically ask for
- "How do I use Infisical with Terraform?" — Provider setup and auth
- "How do I prevent secrets in my Terraform state?" — Ephemeral resources
- "How do I set up Terraform Cloud with Infisical?" — OIDC integration
- "How do I configure project roles and permissions?" — Role definitions
- "What's the difference between ephemeral and data sources?" — Resource patterns
Quick routing
- Provider authentication, configuration, env vars → Provider Setup
- HCL resources: infisical_secret, data sources, project roles, access approval → Resources & Data Sources
- Terraform Cloud OIDC integration, machine identity setup → Terraform Cloud OIDC
Key principles to uphold
- Credentials go inside a nested
authattribute: the provider takesauth = { universal = { client_id, client_secret } }orauth = { oidc = { identity_id, token_environment_variable_name } }. Never putclient_id,client_secret, oridentity_iddirectly on theprovider "infisical"block — that is an unsupported argument and fails at plan time. (Legacyservice_tokenis the one exception and does sit at the top level.) - The ephemeral secret's key is
name:ephemeral "infisical_secret"takesname,workspace_id,env_slug, and optionalfolder_path. There is nosecret_keyargument. - Ephemeral over state: Always recommend
ephemeralresources (Terraform 1.10+) for secrets—values never land in state files. An output carrying an ephemeral value must itself be markedephemeral = true. - Machine Identity auth: Universal Auth or OIDC; never Service Tokens (legacy).
- Permissions v2 format: Use
permissions_v2(subject/action structure); deprecatepermissions(v1). - OIDC for Terraform Cloud: This is the recommended production pattern.
- Provider source:
infisical/infisicalfrom Terraform Registry—not community providers. - Folder path defaults:
folder_path = "/"if omitted. - Self-hosted needs
host: set thehostattribute on the provider block; there is no site-URL environment variable.
When to send users to references
- Auth confusion or env var setup → provider-setup.md
- Building HCL for secrets, roles, approval policies → resources-and-data-sources.md
- TFC + Infisical step-by-step → terraform-cloud-oidc.md
Comments
Markdown supported