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

Commit

Permalink
Merge pull request #86 from Eugst/master
Browse files Browse the repository at this point in the history
Optionally added separate secondary range for services.
  • Loading branch information
robmorgan authored Apr 2, 2020
2 parents 99191da + 89e4f93 commit 146c289
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
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
}

0 comments on commit 146c289

Please sign in to comment.