Terraform Cloud/Github integration

Hello there,

I am looking to automate some Terraform code and I’m using github as the VCS. I have mostly followed this tutorial (I realise it’s not official Hashicorp documentation). It seems to suggest that if the steps followed, when a PR is made it will automatically trigger a Run in TF CLoud, however this doesn’t seem to be happening in my case.

I have connected the VCS is TF cloud and everything seems to be talking to each other OK. I have successfully done a Remote Plan and everything looks OK there.

The changes that I’m using to test with do not trigger any infrastructure changes, so that may be the issue, but according to the above tutorial, I would expect a PR alone to do this, perhaps I’m wrong.

I have also found this official Hashicorp documentation, which appears to suggest that Github Actions must be set up to achieve these automated actions in TF Cloud. Is there any official guidance on this? Should PR creation automatically trigger anything in TF Cloud without Github Actions being set up?

Thanks in advance

Jerry

Although it is great that you’ve mentioned the tutorial that you are working with, that’s a long document to expect a community volunteer to study to figure out what you’ve done so far. A summary would be worthwhile.

When you connect Terraform Cloud to GitHub, you grant the “Terraform Cloud” GitHub app access to your repository. This is how it is able to receive notifications from GitHub when a PR is created, and subject to “Settings > Version Control > Pull Requests > Automatic speculative plans” being turned on, trigger PR runs.

This does not require GitHub Actions.