From 51795d1c9786737fdc93c13ffd9027543e0dbeab Mon Sep 17 00:00:00 2001 From: Thomas Sibley Date: Wed, 15 May 2024 11:11:22 -0700 Subject: [PATCH] Set up Terraform provider for GitHub Will let us manage (and self-document) our GitHub organization and repo settings via this Terraform configuration. --- README.md | 2 ++ env/production/.terraform.lock.hcl | 24 ++++++++++++++++++++++++ env/production/terraform.tf | 9 +++++++++ 3 files changed, 35 insertions(+) diff --git a/README.md b/README.md index 45c9359..22c083b 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,8 @@ Make those changes so: > You'll need ambiently-configured AWS credentials with broad admin-level > access to read (and optionally modify) resources in our account. > +> You'll also need a `GITHUB_TOKEN` in the environment. +> > Please step cautiously and be careful when using them! diff --git a/env/production/.terraform.lock.hcl b/env/production/.terraform.lock.hcl index 7769532..af16f2f 100644 --- a/env/production/.terraform.lock.hcl +++ b/env/production/.terraform.lock.hcl @@ -25,3 +25,27 @@ provider "registry.terraform.io/hashicorp/aws" { "zh:fac0d2ddeadf9ec53da87922f666e1e73a603a611c57bcbc4b86ac2821619b1d", ] } + +provider "registry.terraform.io/integrations/github" { + version = "6.2.1" + constraints = "~> 6.0" + hashes = [ + "h1:ip7024qn1ewDqlNucxh07DHvuhSLZSqtTGewxNLeYYU=", + "h1:rY+q+OhJm90R900HvO05YNH7Tl0EOnbCLAoG+5niLX8=", + "h1:uDerb9YJo3vAO+wKw+Z064InX5aXom+nKLDry2eGf14=", + "zh:172aa5141c525174f38504a0d2e69d0d16c0a0b941191b7170fe6ae4d7282e30", + "zh:1a098b731fa658c808b591d030cc17cc7dfca1bf001c3c32e596f8c1bf980e9f", + "zh:245d6a1c7e632d8ae4bdd2da2516610c50051e81505cf420a140aa5fa076ea90", + "zh:43c61c230fb4ed26ff1b04b857778e65be3d8f80292759abbe2a9eb3c95f6d97", + "zh:59bb7dd509004921e4322a196be476a2f70471b462802f09d03d6ce96f959860", + "zh:5cb2ab8035d015c0732107c109210243650b6eb115e872091b0f7b98c2763777", + "zh:69d2a6acfcd686f7e859673d1c8a07fc1fc1598a881493f19d0401eb74c0f325", + "zh:77f36d3f46911ace5c50dee892076fddfd64a289999a5099f8d524c0143456d1", + "zh:87df41097dfcde72a1fbe89caca882af257a4763c2e1af669c74dcb8530f9932", + "zh:899dbe621f32d58cb7c6674073a6db8328a9db66eecfb0cc3fc13299fd4e62e7", + "zh:ad2eb7987f02f7dd002076f65a685730705d04435313b5cf44d3a6923629fb29", + "zh:b2145ae7134dba893c7f74ad7dfdc65fdddf6c7b1d0ce7e2f3baa96212322fd8", + "zh:bd6bae3ac5c3f96ad9219d3404aa006ef1480e9041d4c95df1808737e37d911b", + "zh:e89758b20ae59f1b9a6d32c107b17846ddca9634b868cf8f5c927cbb894b1b1f", + ] +} diff --git a/env/production/terraform.tf b/env/production/terraform.tf index c620d66..6e8d63a 100644 --- a/env/production/terraform.tf +++ b/env/production/terraform.tf @@ -5,6 +5,10 @@ terraform { source = "registry.terraform.io/hashicorp/aws" version = "~> 4.32" } + github = { + source = "integrations/github" + version = "~> 6.0" + } } backend "s3" { @@ -25,3 +29,8 @@ terraform { provider "aws" { region = "us-east-1" } + +provider "github" { + # Authn is via GITHUB_TOKEN + owner = "nextstrain" +}