Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix: Blank requests #79

Open
gnmeyer opened this issue Jan 27, 2025 · 0 comments
Open

Bug fix: Blank requests #79

gnmeyer opened this issue Jan 27, 2025 · 0 comments

Comments

@gnmeyer
Copy link

gnmeyer commented Jan 27, 2025

Issue: Terraform PR Job Fails When No Changes Are Detected

Description

When a Terraform plan results in no changes, the PR job fails with the following error:

RequestError [HttpError]: Validation Failed: {"resource":"IssueComment","code":"unprocessable","field":"data","message":"Body cannot be blank"}

This happens because the terraform-change-pr-commenter action attempts to post an empty comment to the PR, which is not allowed by the GitHub API.

Steps to Reproduce

  1. Push a blank main.tf file to trigger a Terraform plan.

  2. Terraform detects no infrastructure changes and outputs:

    Terraform has compared your real infrastructure against your configuration  
    and found no differences, so no changes are needed.
    
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

No branches or pull requests

1 participant