Kubernetes Gateway Terraform Module
Terraform module to manage Kubernetes Gateway resource (GKE batteries included).
module "example" {
source = " Tensho/gateway/kubernetes"
version = " 0.4.0"
name = " example"
namespace = " gateway-system"
class_name = " gke-l7-global-external-managed"
addresses = [
{
type = " NamedAddress"
value = " example-ingress-static-ip"
}
]
annotations = {
" networking.gke.io/certmap" = " example"
}
listeners = [
{
name = " http"
protocol = " HTTP"
port = 80
},
{
name = " https"
protocol = " HTTPS"
port = 443
}
]
ssl_policy = " example"
}
No modules.
Name
Description
Type
Default
Required
addresses
List of addresses for the Gateway. Supports type: IPAddress, NamedAddress, Hostname.
list(object({ type = string value = string }))
null
no
annotations
Gateway annotations
map(string)
{}
no
class_name
Gateway class name
string
n/a
yes
http_to_https_redirect
Redirect HTTP traffic from an infrastructure namespace
string
false
no
listeners
Gateway listeners
any
n/a
yes
name
Gateway name
string
"main"
no
namespace
Kubernetes namespace
string
"default"
no
ssl_policy
GKE GCPGatewayPolicy SSL policy name
string
null
no
This project uses conventional commits .
brew install pre-commit terraform-docs tflint
pre-commit install --install-hooks
tflint --init
export KUBE_CONFIG_PATHS=~ /.kube/config
gcloud auth application-default login
export GOOGLE_PROJECT=terraform-test
cd examples/
terraform init
terraform apply
terraform destroy
terraform init
terraform test
terraform test -filter main.tftest.hcl -verbose