Skip to content

maelvls/gh-actions-chatops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform ChatOps using Github Actions

This repo shows a simple static_site.tf that creates an tiny index.html using a GCP bucket. Instead of calling terraform apply locally (on the developer's laptop) or on some CI, we want to give a bit more interactivity and use the "ChatOps" approach which brings a higher level of transparency (who did what and when). This idea comes from using Prow, the ChatOps bot that powers all Kubernetes repositories.

It goes like this:

  1. When a PR is opened, terraform plan is run and shown as a PR comment.
  2. If /apply is sent as a comment in that PR, terraform apply is run.
  3. The /apply command only works after someone from the CODEOWNERS has approved this PR.
  4. Merging the PR does not trigger anything else.

⚠ Fork PRs: Since I use GITHUB_TOKEN to create/update the bot's comments, it won't work for PRs created from forks (see GITHUB_TOKEN restrictions)

Here is what it looks like in a live PR:

Update static_site tf by hellyesican · Pull Request #4 · maelvlsgh-actions-chatops 2

Releases

No releases published

Packages

No packages published

Languages