Skip to content

Commit

Permalink
clusters creation improvement (#509)
Browse files Browse the repository at this point in the history
* shared_vpc_self_link variable from stage2

* removing shared_vpc_self_link

* do not initial_node_count as node_count
  • Loading branch information
danielmarzini authored and juliocc committed Feb 9, 2022
1 parent 8e8bf25 commit 51cc24b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fast/stages/03-gke-multitenant/prod/gke-clusters.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ locals {
module "gke-cluster" {
source = "../../../../modules/gke-cluster"
for_each = local.clusters
project_id = module.gke-project-0.project_id
name = each.key
project_id = each.value.project_id
description = each.value.description
location = each.value.location
network = each.value.net.vpc
Expand Down
2 changes: 1 addition & 1 deletion fast/stages/03-gke-multitenant/prod/gke-nodepools.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module "gke_1_nodepool" {
project_id = module.gke-project-0.project_id
cluster_name = module.gke-cluster[each.value.cluster].name
location = module.gke-cluster[each.value.cluster].location
initial_node_count = each.value.node_count
initial_node_count = each.value.initial_node_count
node_machine_type = each.value.node_type
# TODO(jccb): can we use spot instances here?
node_preemptible = each.value.preemptible
Expand Down
4 changes: 3 additions & 1 deletion fast/stages/03-gke-multitenant/prod/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ variable "clusters" {
memory_min = number
memory_max = number
})
project_id = string
description = string
dns_domain = string
labels = map(string)
Expand Down Expand Up @@ -139,6 +140,7 @@ variable "nodepools" {
type = map(map(object({
node_count = number
node_type = string
initial_node_count = number
overrides = object({
image_type = string
max_pods_per_node = number
Expand All @@ -159,4 +161,4 @@ variable "vpc_host_project" {
# tfdoc:variable:source 02-networking
description = "Host project for the shared VPC."
type = string
}
}

0 comments on commit 51cc24b

Please sign in to comment.