This Terraform module creates a GitHub repo and issue labels. Using this module in automation with Consul Terraform Sync (CTS) will dynamically create or delete GitHub issue labels based off of configured services. This module is useful for testing CTS with a provider that supports multiple accounts without setting up infrastructure.
The module uses the github
Terraform provider to create a repository named 'cts-labels' in the configured GitHub account. It then creates GitHub Consul-pink issue labels within this repository. The labels are named after the monitored Consul service instances and have the description of the service instance address and port.
Ecosystem | Version |
---|---|
consul | >= 1.7 |
consul-terraform-sync | >= 0.1.0 |
terraform | >= 0.13 |
Name | Version |
---|---|
github | >= 4.5.2 |
A GitHub personal access token is required in order to use this module:
- Create a GitHub account
- Create a personal access token in GitHub
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_a"
services = ["api"]
providers = ["github"]
version = "0.0.1"
source = "lornasong/cts_label/github"
}
terraform_provider "github" {
token = "<GIT PERSONAL ACCESS TOKEN>"
}