Skip to content

Conversation

@arein
Copy link
Member

@arein arein commented Jan 14, 2026

Summary

  • Add optional ANTHROPIC_API_KEY secret to enable Claude AI review of terraform plans
  • Save terraform plan output to file and upload as artifact
  • Add Claude AI review step that runs when ANTHROPIC_API_KEY is provided
  • Add pull-requests: write permission for PR comments

How it works

When a repo using ci_workflows provides the ANTHROPIC_API_KEY secret:

  1. Terraform plan output is saved to a file
  2. Plan output is uploaded as an artifact (terraform-plan-{stage})
  3. Claude AI reviews the plan and posts findings as PR comments

Repos without ANTHROPIC_API_KEY continue to work as before - the AI review step is skipped.

Test plan

  • Create a test PR in pay-core with terraform changes
  • Verify AI review runs and posts comment
  • Verify behavior when ANTHROPIC_API_KEY is not set (should skip gracefully)

🤖 Generated with Claude Code

- Add optional ANTHROPIC_API_KEY secret to ci-plan-infra.yml
- Save terraform plan output to file for artifact upload
- Upload plan output as artifact on PRs
- Add Claude AI review step when ANTHROPIC_API_KEY is provided
- Add pull-requests: write permission for PR comments

This enables automatic AI review of terraform plans for any repo
that provides the ANTHROPIC_API_KEY secret.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@arein arein requested review from Cali93, bkrem and dnul January 14, 2026 04:54
@arein arein merged commit 350d06d into main Jan 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants