Files
teleport/assets/loadtest/cluster/main.tf
T
rosstimothy e51433fff6 Add Teleport loadtest infrastructure and grafana dashboard (#9023)
This adds loadtesting automation and k8s yamls to deploy teleport to a k8s cluster. The grafana
health dashboard is also included and can be consumed by end users to better monitor
their teleport clusters.
2021-12-07 17:17:02 -05:00

51 lines
1.1 KiB
Terraform

provider "google" {
project = var.project
region = var.region
zone = var.zone
}
terraform {
required_version = ">= 0.12"
}
data "google_compute_network" "default" {
name = var.network
}
resource "google_container_cluster" "loadtest" {
name = var.cluster_name
location = var.region
# clusters are always created with a default node pool,
# so specify the smallest allowed node count and then
# immediately delete it.
remove_default_node_pool = true
initial_node_count = 1
}
resource "google_container_node_pool" "loadtest" {
name = var.cluster_name
cluster = google_container_cluster.loadtest.name
location = google_container_cluster.loadtest.location
node_count = var.nodes_per_zone
node_locations = var.node_locations
node_config {
machine_type = "n1-standard-8"
metadata = {
disable-legacy-endpoints = "true"
}
oauth_scopes = [
"https://www.googleapis.com/auth/logging.write",
"https://www.googleapis.com/auth/monitoring",
"https://www.googleapis.com/auth/devstorage.read_only",
]
}
}