Skip to content

feat: trigger TFC run on lambda changes#69

Merged
Perry2004 merged 1 commit intomainfrom
feat/trigger-tfe-run
Nov 3, 2025
Merged

feat: trigger TFC run on lambda changes#69
Perry2004 merged 1 commit intomainfrom
feat/trigger-tfe-run

Conversation

@Perry2004
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings November 3, 2025 00:51
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds automated Terraform Cloud deployment triggering after Lambda container images are built and pushed to ECR. The workflow now triggers a Terraform Cloud run to deploy the updated Lambda image.

  • Adds a new step to trigger Terraform Cloud runs via API after successful image builds
  • Uses workspace ID from GitHub variables and API token from secrets for authentication
  • Includes commit SHA in the run message for traceability

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

--data @payload.json \
https://app.terraform.io/api/v2/runs
env:
TF_API_TOKEN: ${{ secrets.TFC_API_TOKEN }}
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The environment variable TF_API_TOKEN is defined but never used in the step. The Authorization header already uses ${{ secrets.TFC_API_TOKEN }} directly. This redundant environment variable should be removed.

Suggested change
TF_API_TOKEN: ${{ secrets.TFC_API_TOKEN }}

Copilot uses AI. Check for mistakes.
https://app.terraform.io/api/v2/runs
env:
TF_API_TOKEN: ${{ secrets.TFC_API_TOKEN }}
GITHUB_SHA: ${{ github.sha }}
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The environment variable GITHUB_SHA is defined but never used in the step. The commit SHA is already referenced directly as ${{ github.sha }} in the message on line 53. This redundant environment variable should be removed.

Suggested change
GITHUB_SHA: ${{ github.sha }}

Copilot uses AI. Check for mistakes.
@Perry2004 Perry2004 merged commit a2ca7ed into main Nov 3, 2025
8 checks passed
@Perry2004 Perry2004 deleted the feat/trigger-tfe-run branch November 3, 2025 00:53
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.

2 participants