Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TF-15186] add active-active as valid operational mode input #334

Merged
merged 1 commit into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
# SPDX-License-Identifier: MPL-2.0

locals {
active_active = var.node_count >= 2
active_active = var.node_count >= 2 || var.operational_mode == "active-active"
kms_key_arn = data.aws_kms_key.main.arn
enable_airgap = var.airgap_url == null && var.tfe_license_bootstrap_airgap_package_path != null
enable_external = var.operational_mode == "external" || local.active_active
enable_disk = var.operational_mode == "disk"
enable_database_module = local.enable_external
enable_object_storage_module = local.enable_external
enable_redis_module = local.active_active
fdo_operational_mode = local.enable_disk ? "disk" : local.active_active ? "active-active" : "external"
fdo_operational_mode = var.operational_mode
ami_id = local.default_ami_id ? data.aws_ami.ubuntu.id : var.ami_id
default_ami_id = var.ami_id == null
fqdn = "${var.tfe_subdomain}.${var.domain_name}"
Expand Down
4 changes: 2 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ variable "operational_mode" {
type = string

validation {
condition = contains(["external", "disk"], var.operational_mode)
error_message = "The operational_mode value must be one of: \"external\"; \"disk\"."
condition = contains(["external", "disk", "active-active"], var.operational_mode)
error_message = "The operational_mode value must be one of: \"active-active\", \"external\"; \"disk\"."
}
}

Expand Down
Loading