Skip to content
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.

Optionally added separate secondary range for services. #86

Merged
merged 2 commits into from
Apr 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/gke-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ resource "google_container_cluster" "cluster" {
ip_allocation_policy {
// Choose the range, but let GCP pick the IPs within the range
cluster_secondary_range_name = var.cluster_secondary_range_name
services_secondary_range_name = var.cluster_secondary_range_name
services_secondary_range_name = var.services_secondary_range_name != null ? var.services_secondary_range_name : var.cluster_secondary_range_name
}

# We can optionally control access to the cluster
Expand Down
6 changes: 6 additions & 0 deletions modules/gke-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -203,3 +203,9 @@ variable "enable_vertical_pod_autoscaling" {
type = string
default = false
}

variable "services_secondary_range_name" {
description = "The name of the secondary range within the subnetwork for the services to use"
type = string
default = null
}