Individual skill

sg-writing-stackguardian-workflow-terraform

Use when writing, reviewing or debugging Terraform/OpenTofu HCL for StackGuardian workflows (stackguardian_workflow_git, stackguardian_workflow_from_template, workflow templates/revisions, CUSTOM Ansible/Helm/kubectl/CloudFormation steps) — vcs_config, terraform_config, connectors, secrets in env vars, runners and stackguardian_runner_group, schedules, VCS triggers, notifications, chaining, workflow outputs — or when a workflow applies but every run fails, or when migrating old `stackguardian_workflow` + `data = jsonencode(...)` code. Also covers looking up the org's connectors, secrets, runner groups and templates via the StackGuardian MCP server.

skills/sg-writing-stackguardian-workflow-terraform/SKILL.md

Read pinned source

Source commit 66070a05d05c95c06fe936ac0ad2c9bb68bf7623

What was checked

Matches the observed repository HEAD
Yes
Scanner rules are current
Yes
Repository scan complete
No
Skill scan complete
No
Observed behavior
Network or broad shell
Last checked
Nov 6, 2026

These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.

Install this skill

Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.

An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.

Repository context

Repository stars (not skill ratings)
12
Repository last updated
Nov 2, 2026
License
Apache-2.0

Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.

Files and excerpt

File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.

Browse files
Read excerpt

# Writing StackGuardian workflow Terraform

## Overview

Provider `StackGuardian/stackguardian` **1.12.3** (Terraform Plugin Framework). Every nested
structure is an **attribute** (`x = {...}` / `x = [{...}]`), never a block. Facts were verified on
1.12.3; on a newer provider re-check rules 11 and 12 first (they are provider bugs). The provider
validates almost nothing, so mistakes show up as: a 400 at apply, *"Provider produced
inconsistent result after apply"* (the resource is tainted when this happens on create), or a
workflow that is created and then
fails every run. Everything below was checked against provider, api, core, run-controller
and step-template source, and the traps marked **(live)** were reproduced against a real org.

Groups: **sg-writing-stackguardian-workflow-group-terraform**. Guardrails/approvals on plans: