This directory contains Google Cloud resources for a Kubernetes deployment.
This repository uses a standard Terraform workflow (init
, plan
, apply
).
For more information, including detailed usage guidelines, see the Terraform documentation.
Name | Description | Type | Required |
---|---|---|---|
google_project | The project indicates the default GCP project all of your resources will be created in. | string |
yes |
google_region | The region will be used to choose the default location for regional resources. | string |
no |
iam_roles | List of IAM Roles. | list(string) |
no |
machine_type | The machine type to be used for the GKE nodes. | string |
no |
project_services | List of Project Services. | list(string) |
no |
tfe_workspaces_prefix | Prefix for TFE Workspaces. | string |
no |
Name | Description |
---|---|
cluster_id | GKE Cluster ID. |
cluster_name | GKE Cluster Name. |
cluster_region | GKE Cluster Region. |
console_url | Google Cloud Console URL. |
workspace_url | Terraform Cloud Workspace URL. |
The Kubernetes Cluster can be consumed via the google_container_cluster data source:
# see https://registry.terraform.io/providers/hashicorp/google/latest/docs/data-sources/container_cluster
data "google_container_cluster" "cluster" {
name = "multi-cloud-k8s"
location = "us-west2"
}
The implementation of this GKE Cluster is based on previous work carried out by Bruno Schaatsbergen. If you're looking to setup a private GKE Cluster, we recommend checking out this repository to understand how to access it, and manage the resources inside using Terraform.