From 43c067fa9cdadf05396c29a5c013c705e86bf93f Mon Sep 17 00:00:00 2001 From: Dalton Barreto Date: Wed, 16 Oct 2024 18:28:59 -0300 Subject: [PATCH 1/6] Movendo crd/integer para schemaProcessor/integer/v0/processor --- CustomResourceDefinition/v1alpha1/array/main.tf | 2 +- CustomResourceDefinition/v1alpha1/object/main.tf | 2 +- .../v1alpha1/reduced_array/main.tf | 2 +- .../v1alpha1/reduced_object/main.tf | 2 +- .../v1alpha1/root_object/main.tf | 2 +- .../integer/v0/processor}/main.tf | 0 .../integer/v0/processor}/variables.tf | 0 ...omResourceDefinition_v1alpha1_integer.tftest.hcl | 13 +++++++------ 8 files changed, 12 insertions(+), 11 deletions(-) rename {CustomResourceDefinition/v1alpha1/integer => schemaProcessor/integer/v0/processor}/main.tf (100%) rename {CustomResourceDefinition/v1alpha1/integer => schemaProcessor/integer/v0/processor}/variables.tf (100%) diff --git a/CustomResourceDefinition/v1alpha1/array/main.tf b/CustomResourceDefinition/v1alpha1/array/main.tf index ba51e91..3b721ad 100644 --- a/CustomResourceDefinition/v1alpha1/array/main.tf +++ b/CustomResourceDefinition/v1alpha1/array/main.tf @@ -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 diff --git a/CustomResourceDefinition/v1alpha1/object/main.tf b/CustomResourceDefinition/v1alpha1/object/main.tf index f5ec8ad..83b24f1 100644 --- a/CustomResourceDefinition/v1alpha1/object/main.tf +++ b/CustomResourceDefinition/v1alpha1/object/main.tf @@ -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 diff --git a/CustomResourceDefinition/v1alpha1/reduced_array/main.tf b/CustomResourceDefinition/v1alpha1/reduced_array/main.tf index b2362fd..b92304c 100644 --- a/CustomResourceDefinition/v1alpha1/reduced_array/main.tf +++ b/CustomResourceDefinition/v1alpha1/reduced_array/main.tf @@ -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 diff --git a/CustomResourceDefinition/v1alpha1/reduced_object/main.tf b/CustomResourceDefinition/v1alpha1/reduced_object/main.tf index acb3c75..5a22465 100644 --- a/CustomResourceDefinition/v1alpha1/reduced_object/main.tf +++ b/CustomResourceDefinition/v1alpha1/reduced_object/main.tf @@ -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 diff --git a/CustomResourceDefinition/v1alpha1/root_object/main.tf b/CustomResourceDefinition/v1alpha1/root_object/main.tf index dbebc9c..d79f43c 100644 --- a/CustomResourceDefinition/v1alpha1/root_object/main.tf +++ b/CustomResourceDefinition/v1alpha1/root_object/main.tf @@ -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 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/tests/CustomResourceDefinition_v1alpha1_integer.tftest.hcl b/tests/CustomResourceDefinition_v1alpha1_integer.tftest.hcl index 1fa42ee..63fa55c 100644 --- a/tests/CustomResourceDefinition_v1alpha1_integer.tftest.hcl +++ b/tests/CustomResourceDefinition_v1alpha1_integer.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 { From 0d325c0baa85450a43846b81a5fef7c573d245cf Mon Sep 17 00:00:00 2001 From: Dalton Barreto Date: Wed, 16 Oct 2024 18:36:29 -0300 Subject: [PATCH 2/6] Movendo schemaValidation/integer/v0 para schemaProcessor/integer/v0/validator --- .../integer/v0/validator}/main.tf | 0 .../integer/v0/validator}/variables.tf | 0 schemaValidation/integer/main.tf | 2 +- tests/schemaValidation_integer_v0.tftest.hcl | 10 +++++----- 4 files changed, 6 insertions(+), 6 deletions(-) rename {schemaValidation/integer/v0 => schemaProcessor/integer/v0/validator}/main.tf (100%) rename {schemaValidation/integer/v0 => schemaProcessor/integer/v0/validator}/variables.tf (100%) 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/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/tests/schemaValidation_integer_v0.tftest.hcl b/tests/schemaValidation_integer_v0.tftest.hcl index 74a5aa7..b19dd5d 100644 --- a/tests/schemaValidation_integer_v0.tftest.hcl +++ b/tests/schemaValidation_integer_v0.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 { From b6774b07a9c278777578464ac026e6a32f0d4f0f Mon Sep 17 00:00:00 2001 From: Dalton Barreto Date: Fri, 25 Oct 2024 15:12:40 -0300 Subject: [PATCH 3/6] Ajustando nome dos testes para integer/v0/{validator,processor} --- ...tftest.hcl => schemaProcessor_integer_v0_processor.tftest.hcl} | 0 ...tftest.hcl => schemaProcessor_integer_v0_validator.tftest.hcl} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename tests/{CustomResourceDefinition_v1alpha1_integer.tftest.hcl => schemaProcessor_integer_v0_processor.tftest.hcl} (100%) rename tests/{schemaValidation_integer_v0.tftest.hcl => schemaProcessor_integer_v0_validator.tftest.hcl} (100%) diff --git a/tests/CustomResourceDefinition_v1alpha1_integer.tftest.hcl b/tests/schemaProcessor_integer_v0_processor.tftest.hcl similarity index 100% rename from tests/CustomResourceDefinition_v1alpha1_integer.tftest.hcl rename to tests/schemaProcessor_integer_v0_processor.tftest.hcl diff --git a/tests/schemaValidation_integer_v0.tftest.hcl b/tests/schemaProcessor_integer_v0_validator.tftest.hcl similarity index 100% rename from tests/schemaValidation_integer_v0.tftest.hcl rename to tests/schemaProcessor_integer_v0_validator.tftest.hcl From ff9919ae5d15ed5dd17a7d2619714bf1612279dc Mon Sep 17 00:00:00 2001 From: Dalton Barreto Date: Wed, 30 Oct 2024 19:08:32 -0300 Subject: [PATCH 4/6] Movendo crd/string para schemaProcessor/string/v0/processor --- CustomResourceDefinition/v1alpha1/array/main.tf | 2 +- CustomResourceDefinition/v1alpha1/object/main.tf | 2 +- .../v1alpha1/reduced_array/main.tf | 2 +- .../v1alpha1/reduced_object/main.tf | 2 +- .../v1alpha1/root_object/main.tf | 2 +- .../string/v0/processor}/main.tf | 0 .../string/v0/processor}/variables.tf | 0 ...hemaProcessor_string_v0_processor.tftest.hcl} | 16 ++++++++-------- 8 files changed, 13 insertions(+), 13 deletions(-) rename {CustomResourceDefinition/v1alpha1/string => schemaProcessor/string/v0/processor}/main.tf (100%) rename {CustomResourceDefinition/v1alpha1/string => schemaProcessor/string/v0/processor}/variables.tf (100%) rename tests/{CustomResourceDefinition_v1alpha1_string.tftest.hcl => schemaProcessor_string_v0_processor.tftest.hcl} (87%) diff --git a/CustomResourceDefinition/v1alpha1/array/main.tf b/CustomResourceDefinition/v1alpha1/array/main.tf index 3b721ad..3227d37 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 diff --git a/CustomResourceDefinition/v1alpha1/object/main.tf b/CustomResourceDefinition/v1alpha1/object/main.tf index 83b24f1..5aabce3 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 diff --git a/CustomResourceDefinition/v1alpha1/reduced_array/main.tf b/CustomResourceDefinition/v1alpha1/reduced_array/main.tf index b92304c..5a00d4c 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 diff --git a/CustomResourceDefinition/v1alpha1/reduced_object/main.tf b/CustomResourceDefinition/v1alpha1/reduced_object/main.tf index 5a22465..9898f59 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 diff --git a/CustomResourceDefinition/v1alpha1/root_object/main.tf b/CustomResourceDefinition/v1alpha1/root_object/main.tf index d79f43c..4e663e6 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 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/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 { From 76fd699f65765dcd4d1d2bd65d22ef4c526894fd Mon Sep 17 00:00:00 2001 From: Dalton Barreto Date: Wed, 30 Oct 2024 19:26:46 -0300 Subject: [PATCH 5/6] Movendo schemaProcessor/string para schemaProcessor/string/v0/validator --- .../v0 => schemaProcessor/string/v0/validator}/main.tf | 0 .../string/v0/validator}/variables.tf | 0 schemaValidation/string/main.tf | 2 +- ... => schemaProcessor_string_v0_validator.tftest.hcl} | 10 +++++----- 4 files changed, 6 insertions(+), 6 deletions(-) rename {schemaValidation/string/v0 => schemaProcessor/string/v0/validator}/main.tf (100%) rename {schemaValidation/string/v0 => schemaProcessor/string/v0/validator}/variables.tf (100%) rename tests/{schemaValidation_string_v0.tftest.hcl => schemaProcessor_string_v0_validator.tftest.hcl} (88%) 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/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_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 { From db6705b7913f65c7353eef7c86575bafe0941901 Mon Sep 17 00:00:00 2001 From: Dalton Barreto Date: Wed, 30 Oct 2024 20:19:46 -0300 Subject: [PATCH 6/6] Move bool/v0 para schemaProcessor --- CustomResourceDefinition/v1alpha1/array/main.tf | 5 +++-- CustomResourceDefinition/v1alpha1/object/main.tf | 2 +- CustomResourceDefinition/v1alpha1/reduced_array/main.tf | 2 +- CustomResourceDefinition/v1alpha1/reduced_object/main.tf | 2 +- CustomResourceDefinition/v1alpha1/root_object/main.tf | 2 +- .../bool => schemaProcessor/bool/v0/processor}/main.tf | 0 .../bool => schemaProcessor/bool/v0/processor}/variables.tf | 0 .../bool/v0 => schemaProcessor/bool/v0/validator}/main.tf | 0 .../v0 => schemaProcessor/bool/v0/validator}/variables.tf | 0 schemaValidation/bool/main.tf | 2 +- ...est.hcl => schemaProcessor_bool_v0_validator.tftest.hcl} | 6 +++--- 11 files changed, 11 insertions(+), 10 deletions(-) rename {CustomResourceDefinition/v1alpha1/bool => schemaProcessor/bool/v0/processor}/main.tf (100%) rename {CustomResourceDefinition/v1alpha1/bool => schemaProcessor/bool/v0/processor}/variables.tf (100%) rename {schemaValidation/bool/v0 => schemaProcessor/bool/v0/validator}/main.tf (100%) rename {schemaValidation/bool/v0 => schemaProcessor/bool/v0/validator}/variables.tf (100%) rename tests/{schemaValidation_bool_v0.tftest.hcl => schemaProcessor_bool_v0_validator.tftest.hcl} (87%) diff --git a/CustomResourceDefinition/v1alpha1/array/main.tf b/CustomResourceDefinition/v1alpha1/array/main.tf index 3227d37..8e656cc 100644 --- a/CustomResourceDefinition/v1alpha1/array/main.tf +++ b/CustomResourceDefinition/v1alpha1/array/main.tf @@ -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 5aabce3..d19d133 100644 --- a/CustomResourceDefinition/v1alpha1/object/main.tf +++ b/CustomResourceDefinition/v1alpha1/object/main.tf @@ -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 5a00d4c..bac0c50 100644 --- a/CustomResourceDefinition/v1alpha1/reduced_array/main.tf +++ b/CustomResourceDefinition/v1alpha1/reduced_array/main.tf @@ -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 9898f59..31ec14f 100644 --- a/CustomResourceDefinition/v1alpha1/reduced_object/main.tf +++ b/CustomResourceDefinition/v1alpha1/reduced_object/main.tf @@ -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 4e663e6..5104e58 100644 --- a/CustomResourceDefinition/v1alpha1/root_object/main.tf +++ b/CustomResourceDefinition/v1alpha1/root_object/main.tf @@ -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/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/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 {