Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
influxdb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
influxdb
Commits
b3d4ef6c
Commit
b3d4ef6c
authored
Feb 24, 2020
by
David McKay
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add branch protection through Terraform
parent
2df21790
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
8 deletions
+23
-8
terraform.yaml
.github/workflows/terraform.yaml
+1
-1
main.tf
terraform/main.tf
+1
-5
repository.tf
terraform/repository.tf
+21
-2
No files found.
.github/workflows/terraform.yaml
View file @
b3d4ef6c
name
:
Terraform
name
:
Repository Configuration with
Terraform
on
:
push
:
...
...
terraform/main.tf
View file @
b3d4ef6c
...
...
@@ -8,8 +8,8 @@ provider "google" {
}
provider "github" {
token = var.github_token
organization = "influxdata"
anonymous = false
}
terraform {
...
...
@@ -18,7 +18,3 @@ terraform {
prefix = "github.com/helm-charts"
}
}
variable "github_token" {
type = string
}
terraform/repository.tf
View file @
b3d4ef6c
...
...
@@ -3,7 +3,8 @@ resource "github_repository" "helm_charts" {
description = "Official Helm Chart Repository for InfluxData Applications"
allow_merge_commit = false
allow_rebase_merge = false
allow_squash_merge = false
allow_rebase_merge = true
has_downloads = true
has_issues = true
...
...
@@ -18,6 +19,25 @@ resource "github_repository" "helm_charts" {
private = false
}
resource "github_branch_protection" "helm_charts_master" {
repository = "${github_repository.helm_charts.name}"
branch = "master"
enforce_admins = true
required_status_checks {
strict = true
}
required_pull_request_reviews {
dismiss_stale_reviews = true
require_code_owner_reviews = true
required_approving_review_count = 2
}
restrictions {
}
}
variable "colour_dark_blue" {
type = string
default = "779ecb"
...
...
@@ -34,4 +54,3 @@ resource "github_issue_label" "types" {
repository = github_repository.helm_charts.name
color = var.colour_dark_blue
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment