The Terraform scripts in this repo use Terraform modules to create the DEV and the PROD clusters. The two modules used are:
- terraform-google-gke-cluster : launches a cluster and deletes its default node pool.
- terraform-google-gke-node-pool : launches new node pools and associate them to existing clusters.
An example of using the modules together is available. The input variables for each of the modules are listed in their README files (cluster , node pools).
The DEV cluster terraform config is available in a file called dev-cluster.tf
.
The TF file name can be changed to anything else. It also can be split to multiple files (e.g, variables.tf & outputs.tf & main.tf)
The secrets config is available in secrets/main.tf.
The terraform state files are stored in Google buckets.
- For the DEV cluster: it is stored in a bucket called:
pi-ostelco-dev-terraform-state/clusters/dev/state
in thepi-ostelco-dev
project. - The secrets terraform state is stored in
pi-ostelco-dev-terraform-state/secrets/dev/state
in thepi-ostelco-dev
project.