Commit e8e36fb7 authored by David McKay's avatar David McKay

feat: add terraform for repository configuration

parent c832cdb3
on:
push:
paths:
- "terraform/**"
jobs:
terraform:
name: "Terraform"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@master
- name: "Terraform Format"
uses: hashicorp/terraform-github-actions@master
with:
tf_actions_version: 0.12.13
tf_actions_subcommand: "fmt"
tf_actions_working_dir: "terraform"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Terraform Init"
uses: hashicorp/terraform-github-actions@master
with:
tf_actions_version: 0.12.13
tf_actions_subcommand: "init"
tf_actions_working_dir: "terraform"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Terraform Validate"
uses: hashicorp/terraform-github-actions@master
with:
tf_actions_version: 0.12.13
tf_actions_subcommand: "validate"
tf_actions_working_dir: "terraform"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Terraform Plan"
uses: hashicorp/terraform-github-actions@master
with:
tf_actions_version: 0.12.13
tf_actions_subcommand: "plan"
tf_actions_working_dir: "terraform"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Helm chart automated files
/charts/*/charts
/charts/*/requirements.lock
# Terraform
/terraform/.terraform
# InfluxData Helm Charts
We're working on it 😄
terraform {
required_version = ">= 0.12"
}
provider "google" {
project = "devrel"
region = "us-west2"
}
provider "github" {
token = var.github_token
organization = "influxdata"
}
terraform {
backend "gcs" {
bucket = "influxdata-devrel-operations"
prefix = "github.com/helm-charts"
}
}
variable "github_token" {
type = string
}
resource "github_repository" "helm_charts" {
name = "helm-charts"
description = "Official Helm Chart Repository for InfluxData Applications"
allow_merge_commit = false
allow_rebase_merge = false
has_downloads = true
has_issues = true
has_projects = true
has_wiki = true
topics = [
"helm",
"kubernetes"
]
private = false
}
variable "colour_dark_blue" {
type = string
default = "779ecb"
}
resource "github_issue_label" "types" {
for_each = {
bug = "Is something not working as expected?"
feature = "Would you like to see some new functionality?"
}
name = "type/${each.key}"
description = each.value
repository = github_repository.helm_charts.name
color = var.colour_dark_blue
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment