This module provisions a private Google Kubernetes Engine cluster in the Google Cloud Platform (GCP).
See Google Cloud Platform requirements for details on requirements and usage.
This module assumes the following pre-existing resources:
apache-beam-testing already contains the bucket: b507e468-52e9-4e72-83e5-ecbf563eda12)Create a new file to specify the backend partial configuration. See below for details on naming convention and expected content. apache-beam-testing usage should be version controlled in this repository.
If using apache-beam-testing, a suggested naming convention is .<cluster-name-prefix>.apache-beam-testing.tfbackend. Note this is conventionally a dot file but doesn't have to be.
For example, .my-cluster.apache-beam-testing.tfbackend communicates to others that the backend specifies the state of a Kubernetes cluster with an ID prefix my-cluster in the apache-beam-testing project.
The following is the expected content of the .tfbackend file, where bucket references the name of the Google Cloud Storage bucket created as a pre-requisite.
See below for details on naming convention and expected content. apache-beam-testing usage should be version controlled in this repository.
If using apache-beam-testing:
.test-infra/terraform/google-cloud-platform/google-kubernetes-engine/copyme.apache-beam-testing.tfbackend contains a template with the following. Just change <cluster-name-prefix>.
bucket = "b507e468-52e9-4e72-83e5-ecbf563eda12" prefix = ".test-infra/terraform/google-cloud-platform/google-kubernetes-engine/<cluster-name-prefix>"
Create a new file to specify a .tfvars file for your new Kubernetes cluster for use with the terraform cli -var-file flag. See below for details on naming convention and expected content. apache-beam-testing usage should be version controlled in this repository.
If using apache-beam-testing, a suggested naming convention is <cluster-name-prefix>.<region>.apache-beam-testing.tfvars.
For example, my-cluster.us-central1.apache-beam-testing.tfvars communicates to others that the
Both .test-infra/terraform/google-cloud-platform/google-kubernetes-engine/us-central1.apache-beam-testing.tfvars and .test-infra/terraform/google-cloud-platform/google-kubernetes-engine/us-west1.apache-beam-testing.tfvars are example starter .tfvars files specific to apache-beam-testing for the targeted region. Editing the .tfvars file in an IDE installed with a terraform plugin and it will prompt you for the remaining variables.
Where:
CLUSTER_PREFIX=<cluster-id-prefix> CONFIG=$CLUSTER_PREFIX.apache-beam-testing.tfbackend # file name only without the directory DIR=.test-infra/terraform/google-cloud-platform/google-kubernetes-engine VARS=$CLUSTER_PREFIX.us-west1.apache-beam-testing.tfvars
Run:
terraform -chdir=$DIR init -backend-config=$CONFIG terraform -chdir=$DIR apply -var-file=$VARS
You will be prompted for any remaining variables.