Skip to content

lornasong/terraform-github-cts_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Project Module for Consul Terraform Sync

This Terraform module creates a GitHub repo and projects. Using this module in automation with Consul Terraform Sync (CTS) will dynamically create or delete GitHub projects based off of configured services. This module is useful for testing CTS with a provider that supports multiple accounts without setting up infrastructure.

Feature

The module uses the github Terraform provider to create a repository named 'cts-labels' in the configured GitHub account. It then creates GitHub projects within the repository. The projects are named after the monitored Consul service instances and project description is various service information.

Requirements

Ecosystem Requirements

Ecosystem Version
consul >= 1.7
consul-terraform-sync >= 0.1.0
terraform >= 0.13

Terraform Providers

Name Version
github >= 4.5.2

Setup

A GitHub personal access token is required in order to use this module:

  1. Create a GitHub account
  2. Create a personal access token in GitHub

Usage

User Config for Consul Terraform Sync

See Securely Configure Terraform Providers for alternatives to directly inserting token in config file.

example.hcl

task {
  name           = "task_b"
  services       = ["api"]
  providers      = ["github"]
  version        = "0.0.1"
  source         = "lornasong/cts_project/github"
}

terraform_provider "github" {
  token = "<GIT PERSONAL ACCESS TOKEN>"
}

About

Terraform module that uses CTS to create repo and projects

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages