Skip to content

Latest commit

 

History

History
52 lines (45 loc) · 2.7 KB

File metadata and controls

52 lines (45 loc) · 2.7 KB

Safer GKE Cluster

This example illustrates how to instantiate the opinionated Safer Cluster module.

Inputs

Name Description Type Default Required
cloudrun Boolean to enable / disable CloudRun string "true" no
cluster_name_suffix A suffix to append to the default cluster name string "" no
compute_engine_service_account Service account to associate to the nodes in the cluster string n/a yes
ip_range_pods The secondary ip range to use for pods string "ip-range-pods" no
ip_range_services The secondary ip range to use for pods string "ip-range-scv" no
istio Boolean to enable / disable Istio string "true" no
master_auth_subnetwork The subnetwork that has access to cluster master string "master-auth-subnet" no
master_auth_subnetwork_cidr The cidr block for the subnetwork that has access to cluster master string "10.60.0.0/17" no
master_ipv4_cidr_block The IP range in CIDR notation to use for the hosted master network string "172.16.0.0/28" no
network The VPC network to host the cluster in string "gke-network" no
project_id The project ID to host the cluster in string n/a yes
region The region to host the cluster in string "us-central1" no
subnetwork The subnetwork to host the cluster in string "gke-subnet" no
subnetwork_cidr The cidr block for the subnetwork to host the cluster in string "10.0.0.0/17" no

Outputs

Name Description
ca_certificate The cluster ca certificate (base64 encoded)
client_token The bearer token for auth
cluster_name Cluster name
ip_range_pods The secondary IP range used for pods
ip_range_services The secondary IP range used for services
kubernetes_endpoint The cluster endpoint
location
master_kubernetes_version The master Kubernetes version
network
network_name The name of the VPC being created
project_id
region
service_account The service account to default running nodes as if not overridden in node_pools.
subnet_names The names of the subnet being created
subnetwork
zones List of zones in which the cluster resides

To provision this example, run the following from within this directory:

  • terraform init to get the plugins
  • terraform plan to see the infrastructure plan
  • terraform apply to apply the infrastructure build
  • terraform destroy to destroy the built infrastructure