deploying-entities-terraform

Author and deploy Fianu compliance entities as HCL via the fianulabs/fianu Terraform provider.

1|Updated Jun 11, 2026
One-click install
npx skills add https://github.com/fianulabs/fianu-skills --skill deploying-entities-terraform-fianulabs
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: deploying-entities-terraform
Source: https://github.com/fianulabs/fianu-skills/tree/main/skills/deploying-entities-terraform
Command: npx skills add https://github.com/fianulabs/fianu-skills --skill deploying-entities-terraform-fianulabs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Managing Fianu compliance entities (controls, policies, gates, indexes, environments, targets, collections, notifications) by hand through a Console UI or ad-hoc API calls is error-prone and unauditable. This Skill guides an agent to declare those entities in Terraform HCL and apply them with plan-time validation, drift detection, and import support. ## Core Features & Use Cases - Full resource coverage: Author all nine fianu_* resources plus the fianu_control_test action, with vendored provider schema docs as the authoritative HCL contract. - Auth and wire guidance: Configure OIDC client-credentials, CLI-token, or static-bearer authentication, and understand the base64 X-Fianu-Raw-Content deploy wire format. - file() evaluation pattern: Keep rule.rego, detail.py, and test fixtures as standalone files and load them into detail.evaluation via file(). - Migration and edge cases: Handle the 0.2.x → 0.3.0 gate-pods-to-detail.gate breaking change, the inverted enabled defaults, and cross-entity constraints schemas cannot catch. - Use Case: An agent asked to "deploy a SAST control with a strict policy via Terraform" reads the control and policy schema pages, writes the HCL with a file()-loaded rego rule, wires the fianu_control_test action, and applies it. ## Quick Start Use the deploying-entities-terraform skill to write Terraform HCL that deploys a Fianu control with a rego rule loaded via file() and a matching strict policy.

Frequently Asked Questions about deploying-entities-terraform

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy Fianu controls with Terraform?▼

Use the fianu_control resource from the fianulabs/fianu provider (~> 0.3). Set path, name, and a detail block with full_name, display_key, and an evaluation list that loads rule.rego and fixtures via file(). Apply with terraform apply after configuring provider auth.

How do I test rego rules in a Terraform workflow?▼

Use the fianu_control_test action, which runs a control's rego rules against its input/data fixtures via POST /entities/artifacts/test. Trigger it with an action_trigger lifecycle block or run terraform apply -invoke=action.fianu_control_test.<name>. Requires Terraform CLI 1.14+.

What authentication methods does the fianu Terraform provider support?▼

Three methods: OIDC client-credentials (FIANU_CLIENT_ID/FIANU_CLIENT_SECRET, the default), a CLI token persisted by fianu auth login for GitHub OIDC/WIF flows, and a static bearer token (FIANU_TOKEN) for CI service accounts. FIANU_HOST is always required.

How do I import existing Fianu entities into Terraform state?▼

Run terraform import with the composite ID <entity_type>/<entity_key>, for example terraform import fianu_control.sast control/checkmarx.sast.vulnerabilities. Resource Identity import requires Terraform 1.12+ and import blocks also work.

Why does my migrated gate never activate after upgrading to provider 0.3?▼

In 0.3.0, gate pods moved to detail.gate.checks and the gate-level enabled flag defaults to off. A migrated gate without detail.gate.enabled = true applies cleanly but silently never activates. Set it explicitly; note checks[].enabled has the opposite default.

When should I use fianu_entity_pod instead of fianu_notification?▼

Prefer fianu_notification for notification pods because it validates the payload and exposes it as typed HCL. Use fianu_entity_pod only for pod types with no typed resource, authoring value with jsonencode().