infisical/ai-skills

infisical-terraform

Expert guidance for the Infisical Terraform Provider. Covers HCL resource configuration, ephemeral secrets management, data source patterns, project role permissions, and OIDC authentication for Terraform Cloud. Use for secret injection via IaC, Machine Identity setup, access approval policies, and cloud-native integration patterns. Not for getting secrets into a running app (infisical-setup) or raw REST calls (infisical-api).

First seen Apr 21, 2026

Installation

$ npx skills add infisical/ai-skills --skill infisical-terraform

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from infisical/ai-skills · top by installs.

npx skills add infisical/ai-skills

Browse all from infisical/ai-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 28
License LICENSE
Default branch main
Open issues 1
Status Active

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 4,027 B
  • docs SUMMARY.md 456 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 306 installs

SKILL.md

Infisical 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](/references/provider-setup.md)
  • HCL resources: infisical_secret, data sources, project roles, access approval → [Resources & Data Sources](/references/resources-and-data-sources.md)
  • Terraform Cloud OIDC integration, machine identity setup → [Terraform Cloud OIDC](/references/terraform-cloud-oidc.md)

Key principles to uphold

  1. Credentials go inside a nested auth attribute: the provider takes

auth = { universal = { clientid, clientsecret } } or auth = { oidc = { identityid, tokenenvironmentvariablename } }. Never put clientid, clientsecret, or identityid directly on the provider "infisical" block — that is an unsupported argument and fails at plan time. (Legacy servicetoken is the one exception and does sit at the top level.)

  1. The ephemeral secret's key is name: ephemeral "infisical_secret" takes

name, workspaceid, envslug, and optional folderpath. There is no secretkey argument.

  1. Ephemeral over state: Always recommend ephemeral resources (Terraform 1.10+) for secrets—values never land in state files. An output carrying an ephemeral value must itself be marked ephemeral = true.
  2. Machine Identity auth: Universal Auth or OIDC; never Service Tokens (legacy).
  3. Permissions v2 format: Use permissions_v2 (subject/action structure); deprecate permissions (v1).
  4. OIDC for Terraform Cloud: This is the recommended production pattern.
  5. Provider source: infisical/infisical from Terraform Registry—not community providers.
  6. Folder path defaults: folder_path = "/" if omitted.
  7. Self-hosted needs host: set the host attribute 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