Skip to content

Commit

Permalink
Fix terraform consistent variables for machine deployment replicas (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
adeniyistephen authored Jun 24, 2022
1 parent 1b456e1 commit 632c854
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/terraform/digitalocean/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ output "kubeone_workers" {
# following outputs will be parsed by kubeone and automatically merged into
# corresponding (by name) worker definition
"${var.cluster_name}-pool1" = {
replicas = 1
replicas = var.initial_machinedeployment_replicas
providerSpec = {
annotations = {
"k8c.io/operating-system-profile" = var.initial_machinedeployment_operating_system_profile
Expand Down
6 changes: 6 additions & 0 deletions examples/terraform/digitalocean/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ variable "worker_size" {
type = string
}

variable "initial_machinedeployment_replicas" {
description = "Number of replicas per MachineDeployment"
default = 1
type = number
}

variable "initial_machinedeployment_operating_system_profile" {
default = ""
type = string
Expand Down
2 changes: 1 addition & 1 deletion examples/terraform/equinixmetal/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ output "kubeone_workers" {
# following outputs will be parsed by kubeone and automatically merged into
# corresponding (by name) worker definition
"${var.cluster_name}-pool1" = {
replicas = 1
replicas = var.initial_machinedeployment_replicas
providerSpec = {
annotations = {
"k8c.io/operating-system-profile" = var.initial_machinedeployment_operating_system_profile
Expand Down
6 changes: 6 additions & 0 deletions examples/terraform/equinixmetal/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ variable "project_id" {
type = string
}

variable "initial_machinedeployment_replicas" {
description = "Number of replicas per MachineDeployment"
default = 1
type = number
}

variable "initial_machinedeployment_operating_system_profile" {
default = ""
type = string
Expand Down
2 changes: 1 addition & 1 deletion examples/terraform/gce/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ output "kubeone_workers" {
# following outputs will be parsed by kubeone and automatically merged into
# corresponding (by name) worker definition
"${var.cluster_name}-pool1" = {
replicas = 1
replicas = var.initial_machinedeployment_replicas
providerSpec = {
annotations = {
"k8c.io/operating-system-profile" = var.initial_machinedeployment_operating_system_profile
Expand Down
6 changes: 6 additions & 0 deletions examples/terraform/gce/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,12 @@ variable "cluster_network_cidr" {
type = string
}

variable "initial_machinedeployment_replicas" {
description = "Number of replicas per MachineDeployment"
default = 1
type = number
}

variable "initial_machinedeployment_operating_system_profile" {
default = ""
type = string
Expand Down
2 changes: 1 addition & 1 deletion examples/terraform/hetzner/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ output "kubeone_workers" {
# following outputs will be parsed by kubeone and automatically merged into
# corresponding (by name) worker definition
"${var.cluster_name}-pool1" = {
replicas = var.workers_replicas
replicas = var.initial_machinedeployment_replicas
providerSpec = {
annotations = {
"k8c.io/operating-system-profile" = var.initial_machinedeployment_operating_system_profile
Expand Down
7 changes: 4 additions & 3 deletions examples/terraform/hetzner/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ variable "worker_type" {
type = string
}

variable "workers_replicas" {
default = 1
type = number
variable "initial_machinedeployment_replicas" {
description = "Number of replicas per MachineDeployment"
default = 1
type = number
}

variable "lb_type" {
Expand Down
2 changes: 1 addition & 1 deletion examples/terraform/openstack/output.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ output "kubeone_workers" {
# following outputs will be parsed by kubeone and automatically merged into
# corresponding (by name) worker definition
"${var.cluster_name}-pool1" = {
replicas = 1
replicas = var.initial_machinedeployment_replicas
providerSpec = {
annotations = {
"k8c.io/operating-system-profile" = var.initial_machinedeployment_operating_system_profile
Expand Down
6 changes: 6 additions & 0 deletions examples/terraform/openstack/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ variable "subnet_dns_servers" {
default = ["8.8.8.8", "8.8.4.4"]
}

variable "initial_machinedeployment_replicas" {
description = "Number of replicas per MachineDeployment"
default = 1
type = number
}

variable "initial_machinedeployment_operating_system_profile" {
default = ""
type = string
Expand Down
2 changes: 1 addition & 1 deletion examples/terraform/vsphere/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ output "kubeone_workers" {
# following outputs will be parsed by kubeone and automatically merged into
# corresponding (by name) worker definition
"${var.cluster_name}-pool1" = {
replicas = 1
replicas = var.initial_machinedeployment_replicas
providerSpec = {
annotations = {
"k8c.io/operating-system-profile" = var.initial_machinedeployment_operating_system_profile
Expand Down
6 changes: 6 additions & 0 deletions examples/terraform/vsphere/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ variable "vrrp_router_id" {
type = number
}

variable "initial_machinedeployment_replicas" {
description = "Number of replicas per MachineDeployment"
default = 1
type = number
}

variable "initial_machinedeployment_operating_system_profile" {
default = ""
type = string
Expand Down
2 changes: 1 addition & 1 deletion examples/terraform/vsphere_flatcar/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ output "kubeone_workers" {
# following outputs will be parsed by kubeone and automatically merged into
# corresponding (by name) worker definition
"${var.cluster_name}-pool1" = {
replicas = 1
replicas = var.initial_machinedeployment_replicas
providerSpec = {
annotations = {
"k8c.io/operating-system-profile" = var.initial_machinedeployment_operating_system_profile
Expand Down
6 changes: 6 additions & 0 deletions examples/terraform/vsphere_flatcar/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,12 @@ variable "api_vip" {
type = string
}

variable "initial_machinedeployment_replicas" {
description = "Number of replicas per MachineDeployment"
default = 1
type = number
}

variable "initial_machinedeployment_operating_system_profile" {
default = ""
type = string
Expand Down

0 comments on commit 632c854

Please sign in to comment.