Skip to content

Commit

Permalink
Default to 1 instance when not specified, improve dependency during d…
Browse files Browse the repository at this point in the history
…estroy
  • Loading branch information
dkeightley authored and dkeightley committed Jan 14, 2025
1 parent d97c0c4 commit c185182
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/infra/aws/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ variable "instance_disk_size" {
variable "instance_count" {
type = number
description = "Number of EC2 instances to create"
default = 3
default = 1
nullable = false
}

Expand Down
2 changes: 1 addition & 1 deletion recipes/upstream/aws/k3s/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ locals {

module "rancher_install" {
source = "../../../../modules/rancher"
dependency = var.server_instance_count > 1 ? module.k3s_additional_servers.dependency : module.k3s_first_server.dependency
dependency = var.worker_instance_count != null ? module.k3s_workers.dependency : var.server_instance_count > 1 ? module.k3s_additional_servers.dependency : module.k3s_first_server.dependency
kubeconfig_file = local_file.kube_config_yaml.filename
rancher_hostname = local.rancher_hostname
rancher_replicas = min(var.rancher_replicas, var.server_instance_count)
Expand Down

0 comments on commit c185182

Please sign in to comment.