npx skills add smithery/pluginagentmarketplace --skill terraform-cicd
pluginagentmarketplace/custom-plugin-terraform · Archived
terraform-cicd
Automate Terraform with CI/CD pipelines, GitOps, Atlantis, and deployment workflows
Installation
npx skills add pluginagentmarketplace/custom-plugin-terraform --skill terraform-cicd
Stronger alternatives
This repository is archived — consider an actively maintained alternative.
Implement security best practices including secrets management, policy as code, and compliance …
1 installsGenerate Terraform HCL code following HashiCorp's official style conventions and best practices…
10.5K installsAnalyze Terraform plan JSON output for AzureRM Provider to distinguish between false-positive d…
8.9K installsComprehensive guide for writing and running Terraform tests. Use when creating test files (.tft…
7.5K installsSimilar popular skills
Related neighbors and high-traction skills in the same topics — useful to compare before installing.
Helps users discover and install agent skills when they ask questions like "how do I do X", "fi…
3.3M installsBrowser automation CLI for AI agents. Use when the user needs to interact with websites, includ…
810.4K installsReview UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "chec…
617.3K installsBuild, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and …
576.5K installsPrepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Te…
568.3K installsAlso in this package
Other skills from pluginagentmarketplace/custom-plugin-terraform.
npx skills add pluginagentmarketplace/custom-plugin-terraform
Browse all from pluginagentmarketplace/custom-plugin-terraform
More details
Agent compatibility
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
Also listed on
Alternate registries and mirrors of this skill.
Repository health
main
Skill metadata
Parsed from SKILL.md frontmatter.
Package contents
Files included with this skill beyond the listing page.
-
skill md
SKILL.md4,439 B -
docs
SUMMARY.md105 B
History
- First seen on skills.sh
- First recorded snapshot · 1 installs
SKILL.md
Terraform CI/CD Skill
Production CI/CD patterns for automated Terraform deployments.
GitHub Actions
PR Validation
# .github/workflows/terraform-pr.yml
name: Terraform PR
on:
pull_request:
paths: ['terraform/**']
permissions:
contents: read
pull-requests: write
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
- name: Format Check
run: terraform fmt -check -recursive
- name: Init
run: terraform init -backend=false
- name: Validate
run: terraform validate
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: aquasecurity/[email protected]
- uses: bridgecrewio/checkov-action@v12
with:
directory: terraform/
plan:
needs: [validate, security]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: us-east-1
- uses: hashicorp/setup-terraform@v3
- run: terraform init
- run: terraform plan -no-color | tee plan.txt
- uses: actions/github-script@v7
with:
script: |
const plan = require('fs').readFileSync('plan.txt', 'utf8');
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: '```\n' + plan.slice(0, 60000) + '\n```'
});
Deploy Workflow
# .github/workflows/terraform-apply.yml
name: Terraform Apply
on:
push:
branches: [main]
paths: ['terraform/**']
concurrency:
group: terraform-${{ github.ref }}
cancel-in-progress: false
jobs:
apply:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: us-east-1
- uses: hashicorp/setup-terraform@v3
- run: terraform init
- run: terraform apply -auto-approve
Atlantis
Configuration
# atlantis.yaml
version: 3
automerge: false
parallel_plan: true
parallel_apply: false
projects:
- name: dev
dir: terraform/environments/dev
autoplan:
when_modified: ["*.tf", "*.tfvars"]
enabled: true
apply_requirements:
- approved
- mergeable
- name: prod
dir: terraform/environments/prod
autoplan:
enabled: true
apply_requirements:
- approved
- mergeable
- undiverged
workflows:
default:
plan:
steps:
- init
- run: tflint
- plan
Terraform Cloud
terraform {
cloud {
organization = "my-org"
workspaces {
tags = ["app:myapp"]
}
}
}
resource "tfe_workspace" "app" {
name = "app-${var.environment}"
organization = "my-org"
auto_apply = var.environment != "prod"
vcs_repo {
identifier = "org/repo"
branch = "main"
oauth_token_id = var.oauth_token_id
}
}
Drift Detection
# .github/workflows/drift.yml
name: Drift Detection
on:
schedule:
- cron: '0 */6 * * *'
jobs:
detect:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
- run: terraform init
- id: plan
run: |
terraform plan -detailed-exitcode || echo "drift=true" >> $GITHUB_OUTPUT
- if: steps.plan.outputs.drift == 'true'
uses: slackapi/slack-github-action@v1
with:
payload: '{"text": "Terraform drift detected!"}'
Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| State lock timeout | Concurrent runs | Add concurrency control |
| Plan/Apply mismatch | Changes between steps | Cache plan file |
| Credentials error | OIDC not configured | Setup role trust |
Usage
Skill("terraform-cicd")
Related
- Agent: 07-terraform-cicd (PRIMARY_BOND)