Terraform documentation and change default project. (#584)

This commit is contained in:
Jeremy Edwards
2019-06-25 12:46:29 -07:00
committed by GitHub
parent 76a1cd8427
commit 31dcbe39f7
5 changed files with 56 additions and 2 deletions

View File

@ -0,0 +1,9 @@
# Terraform Templates
This directory contains Terraform templates describe the infrastructure need to
deploy Open Match.
Terraform is a tool that allows you to describe your infrastructure-as-code.
This means you can express your cloud resources as code that gets checked in.
Each subdirectory has an associated README.md file describing that it contains.

View File

@ -0,0 +1,19 @@
# Open Match Continuous Integration Terraform Templates
This directory contains Terraform templates describe the infrastructure need to
build Open Match. The continuous integration project, open-match-build, has
automation to build and publish artifacts.
The resources required to make all this happen are expressed in this template.
This allows us to reproduce this infrastructure on another project in case of
a migration or emergency.
If you're making changes to these files you must check in the .tfstate file as
well as comment the reason why you're enabling a feature or making a change.
## Security Warning
For security purposes, only open-match-build administrators have the
authorization to make changes to this file.
Under no circumstances should any automation be done with these files since
it's easy to escalate privileges.

View File

@ -0,0 +1,26 @@
# Open Match Terraform Templates
This directory contains Terraform templates describe the infrastructure need to
deploy Open Match securely. These templates serve as a baseline and should be
adapted to fit your scenario.
Terraform is a tool that allows you to describe your infrastructure-as-code.
This means you can express your cloud resources as code that gets checked in.
Open Match for the most part only requires a GKE cluster to operate.
The template itself enables many security hardening features and policies that
steers you to a more production ready setup.
Lastly, these templates are meant for advanced users that are most likely
already using Terraform.
```bash
# Initialize the workspace.
cd install/terraform/open-match
terraform init
# Plan the changes required to setup Open Match infrastructure.
terraform plan
# Apply the changes.
terrafrom apply
```

View File

@ -47,7 +47,7 @@ provider "google-beta" {
variable "gcp_project_id" {
description = "GCP Project ID"
default = "jeremyedwards-gaming-dev"
default = "open-match-build"
}
variable "gcp_location" {

View File

@ -132,5 +132,5 @@ func TestIsOrphaned(t *testing.T) {
func TestSelfLinkToQualifiedName(t *testing.T) {
assert := assert.New(t)
assert.Equal("projects/jeremyedwards-gaming-dev/zones/us-central1-a/clusters/orphaned", selfLinkToQualifiedName("https://container.googleapis.com/v1/projects/jeremyedwards-gaming-dev/zones/us-central1-a/clusters/orphaned"))
assert.Equal("projects/open-match-build/zones/us-central1-a/clusters/orphaned", selfLinkToQualifiedName("https://container.googleapis.com/v1/projects/open-match-build/zones/us-central1-a/clusters/orphaned"))
}