From 172381f2735aedd7d608876b005f922ad8af0f68 Mon Sep 17 00:00:00 2001 From: Michael Li Date: Wed, 31 Aug 2022 12:00:33 -0400 Subject: [PATCH] refact(enos): Move modules to its own file Enos allows module definitions to be in any file. This keeps all of the modules in one place (and also follows the model used by Vault) --- enos/enos-modules.hcl | 68 +++++++++++++++++++++++++++++++++++++++++ enos/enos.hcl | 70 ------------------------------------------- 2 files changed, 68 insertions(+), 70 deletions(-) create mode 100644 enos/enos-modules.hcl diff --git a/enos/enos-modules.hcl b/enos/enos-modules.hcl new file mode 100644 index 000000000..6abcbe229 --- /dev/null +++ b/enos/enos-modules.hcl @@ -0,0 +1,68 @@ +module "az_finder" { + source = "./modules/az_finder" +} + +module "boundary" { + source = "app.terraform.io/hashicorp-qti/aws-boundary/enos" + version = ">= 0.2.6" + + project_name = "qti-enos-boundary" + environment = var.environment + common_tags = { + "Project" : "Enos", + "Project Name" : "qti-enos-boundary", + "Enos User" : var.enos_user, + "Environment" : var.environment + } + + ssh_aws_keypair = var.aws_ssh_keypair_name + alb_listener_api_port = var.alb_listener_api_port +} + +module "bats_deps" { + source = "./modules/bats_deps" +} + +module "build_crt" { + source = "./modules/build_crt" +} + +module "build_local" { + source = "./modules/build_local" +} + +module "infra" { + source = "app.terraform.io/hashicorp-qti/aws-infra/enos" + version = ">= 0.3.1" + + project_name = "qti-enos-boundary" + environment = var.environment + common_tags = { + "Project" : "Enos", + "Project Name" : "qti-enos-boundary", + "Enos User" : var.enos_user, + "Environment" : var.environment + } +} + +module "random_stringifier" { + source = "./modules/random_stringifier" +} + +module "target" { + source = "./modules/target" + target_count = var.target_count + + project_name = "qti-enos-boundary" + environment = var.environment + enos_user = var.enos_user +} + +module "test_smoke" { + source = "./modules/test_smoke" +} + +module "test_cli_ui" { + source = "./modules/test_cli_ui" +} + diff --git a/enos/enos.hcl b/enos/enos.hcl index 0423b6738..bb3d12d06 100644 --- a/enos/enos.hcl +++ b/enos/enos.hcl @@ -33,76 +33,6 @@ provider "enos" "default" { } } -module "az_finder" { - source = "./modules/az_finder" -} - -module "boundary" { - #source = "../../terraform-enos-aws-boundary" - source = "app.terraform.io/hashicorp-qti/aws-boundary/enos" - version = ">= 0.2.6" - - project_name = "qti-enos-boundary" - environment = var.environment - common_tags = { - "Project" : "Enos", - "Project Name" : "qti-enos-boundary", - "Enos User" : var.enos_user, - "Environment" : var.environment - } - - ssh_aws_keypair = var.aws_ssh_keypair_name - alb_listener_api_port = var.alb_listener_api_port -} - -module "bats_deps" { - source = "./modules/bats_deps" -} - -module "build_crt" { - source = "./modules/build_crt" -} - -module "build_local" { - source = "./modules/build_local" -} - -module "infra" { - # source = "../../../terraform-enos-aws-infra" - source = "app.terraform.io/hashicorp-qti/aws-infra/enos" - version = ">= 0.3.1" - - project_name = "qti-enos-boundary" - environment = var.environment - common_tags = { - "Project" : "Enos", - "Project Name" : "qti-enos-boundary", - "Enos User" : var.enos_user, - "Environment" : var.environment - } -} - -module "random_stringifier" { - source = "./modules/random_stringifier" -} - -module "target" { - source = "./modules/target" - target_count = var.target_count - - project_name = "qti-enos-boundary" - environment = var.environment - enos_user = var.enos_user -} - -module "test_smoke" { - source = "./modules/test_smoke" -} - -module "test_cli_ui" { - source = "./modules/test_cli_ui" -} - scenario "integration" { terraform_cli = terraform_cli.default terraform = terraform.default