Skip to content

Commit 8578149

Browse files
fix(prereqs): Remove cross-variable validation blocks unsupported by ORM Terraform 1.5.x (#36)
1 parent 84385b6 commit 8578149

1 file changed

Lines changed: 2 additions & 20 deletions

File tree

Prerequisites/src/variables.tf

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ variable "enabled_migration_scenario" {
3232
default = ""
3333

3434
validation {
35-
condition = (!var.primary_prerequisite_stack) || contains(["VMware to OCI", "VMware to OLVM", "AWS to OCI"], var.enabled_migration_scenario)
36-
error_message = "Primary prerequisite stacks require selecting a valid enabled_migration_scenario (VMware to OCI, VMware to OLVM, AWS to OCI)."
35+
condition = contains(["", "VMware to OCI", "VMware to OLVM", "AWS to OCI"], var.enabled_migration_scenario)
36+
error_message = "Valid values: VMware to OCI, VMware to OLVM, AWS to OCI."
3737
}
3838
}
3939

@@ -70,29 +70,11 @@ variable "remote_agent_logging" {
7070
type = bool
7171
description = "Create service policies allowing Remote Agent Appliances to upload logs."
7272
default = false
73-
74-
validation {
75-
condition = (!var.primary_prerequisite_stack) || (!var.remote_agent_logging) || (
76-
contains(["VMware to OCI", "VMware to OLVM"], var.enabled_migration_scenario) ||
77-
var.add_vmware_to_oci ||
78-
var.add_vmware_to_olvm
79-
)
80-
error_message = "remote_agent_logging can only be enabled when a VMware scenario is enabled (VMware to OCI or VMware to OLVM)."
81-
}
8273
}
8374
variable "hydration_agent_logging" {
8475
type = bool
8576
description = "Create service policies allowing Hydration Agents to upload logs."
8677
default = false
87-
88-
validation {
89-
condition = (!var.primary_prerequisite_stack) || (!var.hydration_agent_logging) || (
90-
contains(["VMware to OCI", "AWS to OCI"], var.enabled_migration_scenario) ||
91-
var.add_vmware_to_oci ||
92-
var.add_aws_to_oci
93-
)
94-
error_message = "hydration_agent_logging can only be enabled when a migration to OCI scenario is enabled (VMware to OCI or AWS to OCI)."
95-
}
9678
}
9779

9880
variable "ocb-service-tenancy-ocid" {

0 commit comments

Comments
 (0)