Code Monkey home page Code Monkey logo

terraform-github-teams's Introduction

Terraform Github Provider User and Teams management

If you want to manage user and teams in github through terraform, this is the repo for you.

This repo makes use of the Github Terraform Provider https://registry.terraform.io/providers/integrations/github/latest/docs

Things you will need to setup:

  • Github Org
  • Github App - create it, install it in the org, create a private key
  • Terraform cloud or local state

Github App

  1. Add your github org name to vars.tfvars
  2. Create a Github App at https://github.com/organizations/{org}/settings/apps/new
    1. Give https://app.terraform.io as Homepage if using terraform cloud
    2. uncheck webhook
    3. select Org permissions > Members > Read and Write
    4. Only this account and apply
  3. Take note of the App ID and add it to the vars.tfvars file
  4. Go to private keys and generate a private key and store it in github-app-private-key.pem file
  5. Go to Install app and install it in your org
  6. Take a note of the Installtion ID in the URL https://github.com/organizations/{org}/settings/installations/{THIS_ID} and put it in vars.tfvars

Terraform

  1. Add your org name and workspace id to providers.tf
  2. Run
terraform init
terraform validate
terraform plan --var-file vars.tfvars
terraform apply --var-file vars.tfvars

Note: the users that you add to your org will need to accept the invite before they appear in any teams.

terraform-github-teams's People

Contributors

bsgrigorov avatar

Stargazers

 avatar

Watchers

 avatar

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.