Giter Site home page Giter Site logo

knanao / runtasks-pr-comment Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 1.0 172 KB

This is the custom run task for Terraform Cloud/Enterprise that enable reviewing a plan output as PR comments

License: Apache License 2.0

Dockerfile 1.24% Makefile 3.82% Go 94.94%
terraform tfc tfe terraform-cloud terraform-enterprise

runtasks-pr-comment's Introduction

runtasks-pr-comment

Warning

This project is not considered production ready and may contain bugs or incomplete features. Please use it cautiously in a production environment.

This is a custom Run Task for Terraform Cloud/Enterprise that enables reviewing the results of a plan as comments.

Diagram

Prerequisites

To use this custom run task you need to have the following:

  1. Terraform Cloud/Enterprise with Run Task entitlement (You can use 1 Run task integration under Free tier.)
  2. Authorizing your GitHub repositories using Personal Access Token (PAT) or GitHub App.

Usage

  • Deploy runtasks-pr-comment as a webhook server. You can also use ngrok for testing purposes. To run you need to provide inputs as enviroment variables. If you use Github App for authorizing access to GitHub you need not to provide GITHUB_OAUTH_TOKEN, but GITHUB_APP_ID, GITHUB_APP_PRIVATE_KEY and GITHUB_APP_INSTALLATION_ID are required.
Name Required Description
GITHUB_OAUTH_TOKEN yes for PAT The token string you were given by your VCS provider, e.g. ghp_xxxxxxxxxxxxxxx for a GitHub personal access token.
GITHUB_APP_ID yes for Github APP The app id of the Github App.
GITHUB_APP_PRIVATE_KEY yes for Github APP The private key of the Github App.
GITHUB_APP_INSTALLATION_ID yes for Github APP The installation id of the Github App.
TFC_RUN_TASK_HMAC_KEY yes HMAC key to verify run task.
  • Create the run task in Terraform Cloud/Enterprise using the UI or tfe provider. HMAC key must be the same with TFC_RUN_TASK_HMAC_KEY.

  • Enable the run task on a specific workspace. This can also be done using UI or tfe provider. The Run stage must be set to Post-plan. Please refer to here for more details.

runtasks-pr-comment's People

Contributors

knanao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

taromurata

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.