mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
chore(infra): add reservation_size var to elixir app (#8659)
We need to decouple the target VM size from the reservation size so that we have wiggle room to spin up new VMs if things go south during a deploy.
This commit is contained in:
Submodule terraform/environments updated: 35df04dd7e...893cdca48d
@@ -95,8 +95,7 @@ resource "google_compute_reservation" "reservation" {
|
||||
specific_reservation_required = true
|
||||
|
||||
specific_reservation {
|
||||
count = var.scaling_horizontal_replicas
|
||||
# count = ceil(var.scaling_horizontal_replicas / length(var.compute_instance_availability_zones))
|
||||
count = var.reservation_size
|
||||
|
||||
instance_properties {
|
||||
machine_type = var.compute_instance_type
|
||||
|
||||
@@ -122,6 +122,19 @@ variable "scaling_horizontal_replicas" {
|
||||
description = "Number of replicas in an instance group."
|
||||
}
|
||||
|
||||
variable "reservation_size" {
|
||||
type = number
|
||||
nullable = false
|
||||
default = 1
|
||||
|
||||
validation {
|
||||
condition = var.reservation_size >= var.scaling_horizontal_replicas
|
||||
error_message = "Reservation size should be greater or equal to the number of scaling_horizontal_replicas."
|
||||
}
|
||||
|
||||
description = "Number of reservations to create."
|
||||
}
|
||||
|
||||
variable "scaling_max_horizontal_replicas" {
|
||||
type = number
|
||||
nullable = true
|
||||
|
||||
Reference in New Issue
Block a user