diff --git a/CustomResourceDefinition/v1alpha1/array/main.tf b/CustomResourceDefinition/v1alpha1/array/main.tf index ba51e91..8e656cc 100644 --- a/CustomResourceDefinition/v1alpha1/array/main.tf +++ b/CustomResourceDefinition/v1alpha1/array/main.tf @@ -1,5 +1,5 @@ module "string" { - source = "../string" + source = "../../../schemaProcessor/string/v0/processor" count = try(var.manifest.items.type == "string", false) ? 1 : 0 metadata_name = var.metadata_name @@ -9,7 +9,7 @@ module "string" { } module "integer" { - source = "../integer" + source = "../../../schemaProcessor/integer/v0/processor" count = try(var.manifest.items.type == "integer", false) ? 1 : 0 metadata_name = var.metadata_name @@ -19,8 +19,9 @@ module "integer" { } module "bool" { - source = "../bool" - count = try(var.manifest.items.type == "bool", false) ? 1 : 0 + source = "../../../schemaProcessor/bool/v0/processor" + + count = try(var.manifest.items.type == "bool", false) ? 1 : 0 metadata_name = var.metadata_name path = var.path diff --git a/CustomResourceDefinition/v1alpha1/object/main.tf b/CustomResourceDefinition/v1alpha1/object/main.tf index f5ec8ad..d19d133 100644 --- a/CustomResourceDefinition/v1alpha1/object/main.tf +++ b/CustomResourceDefinition/v1alpha1/object/main.tf @@ -3,7 +3,7 @@ locals { } module "string" { - source = "../string" + source = "../../../schemaProcessor/string/v0/processor" for_each = toset([for key, value in local.properties : key if try(value.type, null) == "string"]) metadata_name = var.metadata_name @@ -13,7 +13,7 @@ module "string" { } module "integer" { - source = "../integer" + source = "../../../schemaProcessor/integer/v0/processor" for_each = toset([for key, value in local.properties : key if try(value.type, null) == "integer"]) metadata_name = var.metadata_name @@ -23,7 +23,7 @@ module "integer" { } module "bool" { - source = "../bool" + source = "../../../schemaProcessor/bool/v0/processor" for_each = toset([for key, value in local.properties : key if try(value.type, null) == "bool"]) metadata_name = var.metadata_name diff --git a/CustomResourceDefinition/v1alpha1/reduced_array/main.tf b/CustomResourceDefinition/v1alpha1/reduced_array/main.tf index b2362fd..bac0c50 100644 --- a/CustomResourceDefinition/v1alpha1/reduced_array/main.tf +++ b/CustomResourceDefinition/v1alpha1/reduced_array/main.tf @@ -1,5 +1,5 @@ module "string" { - source = "../string" + source = "../../../schemaProcessor/string/v0/processor" count = try(var.manifest.items.type == "string", false) ? 1 : 0 metadata_name = var.metadata_name @@ -9,7 +9,7 @@ module "string" { } module "integer" { - source = "../integer" + source = "../../../schemaProcessor/integer/v0/processor" count = try(var.manifest.items.type == "integer", false) ? 1 : 0 metadata_name = var.metadata_name @@ -19,7 +19,7 @@ module "integer" { } module "bool" { - source = "../bool" + source = "../../../schemaProcessor/bool/v0/processor" count = try(var.manifest.items.type == "bool", false) ? 1 : 0 metadata_name = var.metadata_name diff --git a/CustomResourceDefinition/v1alpha1/reduced_object/main.tf b/CustomResourceDefinition/v1alpha1/reduced_object/main.tf index acb3c75..31ec14f 100644 --- a/CustomResourceDefinition/v1alpha1/reduced_object/main.tf +++ b/CustomResourceDefinition/v1alpha1/reduced_object/main.tf @@ -3,7 +3,7 @@ locals { } module "string" { - source = "../string" + source = "../../../schemaProcessor/string/v0/processor" for_each = toset([for key, value in local.properties : key if try(value.type, null) == "string"]) metadata_name = var.metadata_name @@ -13,7 +13,7 @@ module "string" { } module "integer" { - source = "../integer" + source = "../../../schemaProcessor/integer/v0/processor" for_each = toset([for key, value in local.properties : key if try(value.type, null) == "integer"]) metadata_name = var.metadata_name @@ -23,7 +23,7 @@ module "integer" { } module "bool" { - source = "../bool" + source = "../../../schemaProcessor/bool/v0/processor" for_each = toset([for key, value in local.properties : key if try(value.type, null) == "bool"]) metadata_name = var.metadata_name diff --git a/CustomResourceDefinition/v1alpha1/root_object/main.tf b/CustomResourceDefinition/v1alpha1/root_object/main.tf index dbebc9c..5104e58 100644 --- a/CustomResourceDefinition/v1alpha1/root_object/main.tf +++ b/CustomResourceDefinition/v1alpha1/root_object/main.tf @@ -3,7 +3,7 @@ locals { } module "string" { - source = "../string" + source = "../../../schemaProcessor/string/v0/processor" for_each = toset([for key, value in local.properties : key if try(value.type, null) == "string"]) metadata_name = var.metadata_name @@ -13,7 +13,7 @@ module "string" { } module "integer" { - source = "../integer" + source = "../../../schemaProcessor/integer/v0/processor" for_each = toset([for key, value in local.properties : key if try(value.type, null) == "integer"]) metadata_name = var.metadata_name @@ -23,7 +23,7 @@ module "integer" { } module "bool" { - source = "../bool" + source = "../../../schemaProcessor/bool/v0/processor" for_each = toset([for key, value in local.properties : key if try(value.type, null) == "bool"]) metadata_name = var.metadata_name diff --git a/CustomResourceDefinition/v1alpha1/bool/main.tf b/schemaProcessor/bool/v0/processor/main.tf similarity index 100% rename from CustomResourceDefinition/v1alpha1/bool/main.tf rename to schemaProcessor/bool/v0/processor/main.tf diff --git a/CustomResourceDefinition/v1alpha1/bool/variables.tf b/schemaProcessor/bool/v0/processor/variables.tf similarity index 100% rename from CustomResourceDefinition/v1alpha1/bool/variables.tf rename to schemaProcessor/bool/v0/processor/variables.tf diff --git a/schemaValidation/bool/v0/main.tf b/schemaProcessor/bool/v0/validator/main.tf similarity index 100% rename from schemaValidation/bool/v0/main.tf rename to schemaProcessor/bool/v0/validator/main.tf diff --git a/schemaValidation/bool/v0/variables.tf b/schemaProcessor/bool/v0/validator/variables.tf similarity index 100% rename from schemaValidation/bool/v0/variables.tf rename to schemaProcessor/bool/v0/validator/variables.tf diff --git a/CustomResourceDefinition/v1alpha1/integer/main.tf b/schemaProcessor/integer/v0/processor/main.tf similarity index 100% rename from CustomResourceDefinition/v1alpha1/integer/main.tf rename to schemaProcessor/integer/v0/processor/main.tf diff --git a/CustomResourceDefinition/v1alpha1/integer/variables.tf b/schemaProcessor/integer/v0/processor/variables.tf similarity index 100% rename from CustomResourceDefinition/v1alpha1/integer/variables.tf rename to schemaProcessor/integer/v0/processor/variables.tf diff --git a/schemaValidation/integer/v0/main.tf b/schemaProcessor/integer/v0/validator/main.tf similarity index 100% rename from schemaValidation/integer/v0/main.tf rename to schemaProcessor/integer/v0/validator/main.tf diff --git a/schemaValidation/integer/v0/variables.tf b/schemaProcessor/integer/v0/validator/variables.tf similarity index 100% rename from schemaValidation/integer/v0/variables.tf rename to schemaProcessor/integer/v0/validator/variables.tf diff --git a/CustomResourceDefinition/v1alpha1/string/main.tf b/schemaProcessor/string/v0/processor/main.tf similarity index 100% rename from CustomResourceDefinition/v1alpha1/string/main.tf rename to schemaProcessor/string/v0/processor/main.tf diff --git a/CustomResourceDefinition/v1alpha1/string/variables.tf b/schemaProcessor/string/v0/processor/variables.tf similarity index 100% rename from CustomResourceDefinition/v1alpha1/string/variables.tf rename to schemaProcessor/string/v0/processor/variables.tf diff --git a/schemaValidation/string/v0/main.tf b/schemaProcessor/string/v0/validator/main.tf similarity index 100% rename from schemaValidation/string/v0/main.tf rename to schemaProcessor/string/v0/validator/main.tf diff --git a/schemaValidation/string/v0/variables.tf b/schemaProcessor/string/v0/validator/variables.tf similarity index 100% rename from schemaValidation/string/v0/variables.tf rename to schemaProcessor/string/v0/validator/variables.tf diff --git a/schemaValidation/bool/main.tf b/schemaValidation/bool/main.tf index 11bbe6b..d3c9f26 100644 --- a/schemaValidation/bool/main.tf +++ b/schemaValidation/bool/main.tf @@ -1,5 +1,5 @@ module "v0" { - source = "./v0" + source = "../../schemaProcessor/bool/v0/validator/" count = var.schema.version == "v0" ? 1 : 0 metadata_name = var.metadata_name diff --git a/schemaValidation/integer/main.tf b/schemaValidation/integer/main.tf index 11bbe6b..9983fae 100644 --- a/schemaValidation/integer/main.tf +++ b/schemaValidation/integer/main.tf @@ -1,5 +1,5 @@ module "v0" { - source = "./v0" + source = "../../schemaProcessor/integer/v0/validator/" count = var.schema.version == "v0" ? 1 : 0 metadata_name = var.metadata_name diff --git a/schemaValidation/string/main.tf b/schemaValidation/string/main.tf index 11bbe6b..7f49c0b 100644 --- a/schemaValidation/string/main.tf +++ b/schemaValidation/string/main.tf @@ -1,5 +1,5 @@ module "v0" { - source = "./v0" + source = "../../schemaProcessor/string/v0/validator/" count = var.schema.version == "v0" ? 1 : 0 metadata_name = var.metadata_name diff --git a/tests/schemaValidation_bool_v0.tftest.hcl b/tests/schemaProcessor_bool_v0_validator.tftest.hcl similarity index 87% rename from tests/schemaValidation_bool_v0.tftest.hcl rename to tests/schemaProcessor_bool_v0_validator.tftest.hcl index c9607c1..4bc7e1c 100644 --- a/tests/schemaValidation_bool_v0.tftest.hcl +++ b/tests/schemaProcessor_bool_v0_validator.tftest.hcl @@ -1,7 +1,7 @@ run "missing_value" { command = plan module { - source = "./schemaValidation/bool/v0/" + source = "./schemaProcessor/bool/v0/validator/" } variables { @@ -25,7 +25,7 @@ run "missing_value" { run "with_invalid_value" { command = plan module { - source = "./schemaValidation/bool/v0/" + source = "./schemaProcessor/bool/v0/validator/" } variables { @@ -49,7 +49,7 @@ run "with_invalid_value" { run "with_valid_value" { command = plan module { - source = "./schemaValidation/bool/v0/" + source = "./schemaProcessor/bool/v0/validator/" } variables { diff --git a/tests/CustomResourceDefinition_v1alpha1_integer.tftest.hcl b/tests/schemaProcessor_integer_v0_processor.tftest.hcl similarity index 87% rename from tests/CustomResourceDefinition_v1alpha1_integer.tftest.hcl rename to tests/schemaProcessor_integer_v0_processor.tftest.hcl index 1fa42ee..63fa55c 100644 --- a/tests/CustomResourceDefinition_v1alpha1_integer.tftest.hcl +++ b/tests/schemaProcessor_integer_v0_processor.tftest.hcl @@ -1,7 +1,7 @@ run "without_minimum_and_maximum" { command = plan module { - source = "./CustomResourceDefinition/v1alpha1/integer" + source = "./schemaProcessor/integer/v0/processor" } variables { @@ -30,7 +30,7 @@ run "without_minimum_and_maximum" { run "with_minimum" { command = plan module { - source = "./CustomResourceDefinition/v1alpha1/integer" + source = "./schemaProcessor/integer/v0/processor" } variables { @@ -60,7 +60,8 @@ run "with_minimum" { run "with_minimum_and_maximum" { command = plan module { - source = "./CustomResourceDefinition/v1alpha1/integer" + + source = "./schemaProcessor/integer/v0/processor" } variables { @@ -91,7 +92,7 @@ run "with_minimum_and_maximum" { run "with_invalid_minimum_and_maximum" { command = plan module { - source = "./CustomResourceDefinition/v1alpha1/integer" + source = "./schemaProcessor/integer/v0/processor" } variables { @@ -113,7 +114,7 @@ run "with_invalid_minimum_and_maximum" { run "with_string_minimum" { command = plan module { - source = "./CustomResourceDefinition/v1alpha1/integer" + source = "./schemaProcessor/integer/v0/processor" } variables { @@ -134,7 +135,7 @@ run "with_string_minimum" { run "with_string_maximum" { command = plan module { - source = "./CustomResourceDefinition/v1alpha1/integer" + source = "./schemaProcessor/integer/v0/processor" } variables { diff --git a/tests/schemaValidation_integer_v0.tftest.hcl b/tests/schemaProcessor_integer_v0_validator.tftest.hcl similarity index 88% rename from tests/schemaValidation_integer_v0.tftest.hcl rename to tests/schemaProcessor_integer_v0_validator.tftest.hcl index 74a5aa7..b19dd5d 100644 --- a/tests/schemaValidation_integer_v0.tftest.hcl +++ b/tests/schemaProcessor_integer_v0_validator.tftest.hcl @@ -1,7 +1,7 @@ run "missing_value" { command = plan module { - source = "./schemaValidation/integer/v0/" + source = "./schemaProcessor/integer/v0/validator/" } variables { @@ -28,7 +28,7 @@ run "missing_value" { run "with_invalid_value" { command = plan module { - source = "./schemaValidation/integer/v0/" + source = "./schemaProcessor/integer/v0/validator/" } variables { @@ -55,7 +55,7 @@ run "with_invalid_value" { run "with_wrong_minLegnth" { command = plan module { - source = "./schemaValidation/integer/v0/" + source = "./schemaProcessor/integer/v0/validator/" } variables { @@ -82,7 +82,7 @@ run "with_wrong_minLegnth" { run "with_wrong_maxLegnth" { command = plan module { - source = "./schemaValidation/integer/v0/" + source = "./schemaProcessor/integer/v0/validator/" } variables { @@ -110,7 +110,7 @@ run "with_wrong_maxLegnth" { run "with_valid_value" { command = plan module { - source = "./schemaValidation/integer/v0/" + source = "./schemaProcessor/integer/v0/validator/" } variables { diff --git a/tests/CustomResourceDefinition_v1alpha1_string.tftest.hcl b/tests/schemaProcessor_string_v0_processor.tftest.hcl similarity index 87% rename from tests/CustomResourceDefinition_v1alpha1_string.tftest.hcl rename to tests/schemaProcessor_string_v0_processor.tftest.hcl index 7722054..356a9df 100644 --- a/tests/CustomResourceDefinition_v1alpha1_string.tftest.hcl +++ b/tests/schemaProcessor_string_v0_processor.tftest.hcl @@ -1,7 +1,7 @@ run "without_minLength_and_maxLength" { command = plan module { - source = "./CustomResourceDefinition/v1alpha1/string" + source = "./schemaProcessor/string/v0/processor" } variables { @@ -30,7 +30,7 @@ run "without_minLength_and_maxLength" { run "with_minLength" { command = plan module { - source = "./CustomResourceDefinition/v1alpha1/string" + source = "./schemaProcessor/string/v0/processor" } variables { @@ -60,7 +60,7 @@ run "with_minLength" { run "with_minLength_and_maxLength" { command = plan module { - source = "./CustomResourceDefinition/v1alpha1/string" + source = "./schemaProcessor/string/v0/processor" } variables { @@ -91,7 +91,7 @@ run "with_minLength_and_maxLength" { run "with_invalid_minLength_and_maxLength" { command = plan module { - source = "./CustomResourceDefinition/v1alpha1/string" + source = "./schemaProcessor/string/v0/processor" } variables { @@ -113,7 +113,7 @@ run "with_invalid_minLength_and_maxLength" { run "with_string_minLength" { command = plan module { - source = "./CustomResourceDefinition/v1alpha1/string" + source = "./schemaProcessor/string/v0/processor" } variables { @@ -134,7 +134,7 @@ run "with_string_minLength" { run "with_string_maxLength" { command = plan module { - source = "./CustomResourceDefinition/v1alpha1/string" + source = "./schemaProcessor/string/v0/processor" } variables { @@ -155,7 +155,7 @@ run "with_string_maxLength" { run "with_invalid_minLength_value" { command = plan module { - source = "./CustomResourceDefinition/v1alpha1/string" + source = "./schemaProcessor/string/v0/processor" } variables { @@ -176,7 +176,7 @@ run "with_invalid_minLength_value" { run "with_invalid_maxLength_value" { command = plan module { - source = "./CustomResourceDefinition/v1alpha1/string" + source = "./schemaProcessor/string/v0/processor" } variables { diff --git a/tests/schemaValidation_string_v0.tftest.hcl b/tests/schemaProcessor_string_v0_validator.tftest.hcl similarity index 88% rename from tests/schemaValidation_string_v0.tftest.hcl rename to tests/schemaProcessor_string_v0_validator.tftest.hcl index a88540e..0333307 100644 --- a/tests/schemaValidation_string_v0.tftest.hcl +++ b/tests/schemaProcessor_string_v0_validator.tftest.hcl @@ -1,7 +1,7 @@ run "missing_value" { command = plan module { - source = "./schemaValidation/string/v0/" + source = "./schemaProcessor/string/v0/validator/" } variables { @@ -28,7 +28,7 @@ run "missing_value" { run "with_invalid_value" { command = plan module { - source = "./schemaValidation/string/v0/" + source = "./schemaProcessor/string/v0/validator/" } variables { @@ -55,7 +55,7 @@ run "with_invalid_value" { run "with_wrong_minLegnth" { command = plan module { - source = "./schemaValidation/string/v0/" + source = "./schemaProcessor/string/v0/validator/" } variables { @@ -82,7 +82,7 @@ run "with_wrong_minLegnth" { run "with_wrong_maxLegnth" { command = plan module { - source = "./schemaValidation/string/v0/" + source = "./schemaProcessor/string/v0/validator/" } variables { @@ -110,7 +110,7 @@ run "with_wrong_maxLegnth" { run "with_valid_value" { command = plan module { - source = "./schemaValidation/string/v0/" + source = "./schemaProcessor/string/v0/validator/" } variables {