clusters creation improvement (#509)

* shared_vpc_self_link variable from stage2

* removing shared_vpc_self_link

* do not initial_node_count as node_count
This commit is contained in:
Daniel Marzini 2022-02-06 18:58:51 +01:00 committed by Julio Castillo
parent 740288ea94
commit 5ff2286378
3 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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

View File

@ -68,6 +68,7 @@ variable "clusters" {
memory_min = number
memory_max = number
})
project_id = string
description = string
dns_domain = string
labels = map(string)
@ -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
@ -159,4 +161,4 @@ variable "vpc_host_project" {
# tfdoc:variable:source 02-networking
description = "Host project for the shared VPC."
type = string
}
}