33 lines
653 B
Terraform
Raw Normal View History

terraform {
required_providers {
kubernetes = {
source = "hashicorp/kubernetes"
version = ">= 2.36.0"
}
}
}
variable "public_ingress" {
description = "Set to true to make the kubernetes ingresses exposed to the public internet."
type = bool
}
data "google_client_config" "default" {}
resource "kubernetes_cluster_role_binding" "cluster_admin_binding" {
metadata {
name = "cluster-admin-binding"
}
subject {
kind = "User"
name = data.google_client_config.default.id
}
role_ref {
api_group = "rbac.authorization.k8s.io"
kind = "ClusterRole"
name = "cluster-admin"
}
}