From d876863e3295051491e240daf4b084a11c8987ff Mon Sep 17 00:00:00 2001 From: tei-k Date: Wed, 9 Dec 2020 17:27:21 +0900 Subject: [PATCH 1/5] Remove terratest --- test/.gitignore | 9 - test/modules/awsdeploy/ca/aws.tf | 4 - test/modules/awsdeploy/ca/locals.tf | 19 - test/modules/awsdeploy/ca/locals.tf.dummy | 19 - test/modules/awsdeploy/ca/main.tf | 9 - test/modules/awsdeploy/ca/remote.tf | 7 - test/modules/awsdeploy/ca/vars.tf | 9 - test/modules/awsdeploy/ca/versions.tf | 3 - test/modules/awsdeploy/cassandra/aws.tf | 4 - test/modules/awsdeploy/cassandra/locals.tf | 20 - .../awsdeploy/cassandra/locals.tf.dummy | 20 - test/modules/awsdeploy/cassandra/main.tf | 12 - test/modules/awsdeploy/cassandra/output.tf | 19 - test/modules/awsdeploy/cassandra/remote.tf | 7 - .../awsdeploy/cassandra/terraform.tfvars | 11 - test/modules/awsdeploy/cassandra/vars.tf | 23 - test/modules/awsdeploy/cassandra/versions.tf | 3 - test/modules/awsdeploy/monitor/aws.tf | 4 - test/modules/awsdeploy/monitor/locals.tf | 31 - .../modules/awsdeploy/monitor/locals.tf.dummy | 31 - test/modules/awsdeploy/monitor/main.tf | 14 - test/modules/awsdeploy/monitor/remote.tf | 23 - .../awsdeploy/monitor/terraform.tfvars | 6 - test/modules/awsdeploy/monitor/vars.tf | 18 - test/modules/awsdeploy/monitor/versions.tf | 3 - .../awsdeploy/network/additional_public_keys | 1 - test/modules/awsdeploy/network/aws.tf | 4 - test/modules/awsdeploy/network/main.tf | 14 - test/modules/awsdeploy/network/output.tf | 59 -- .../awsdeploy/network/terraform.tfvars | 21 - test/modules/awsdeploy/network/vars.tf | 21 - test/modules/awsdeploy/network/versions.tf | 3 - test/modules/awsdeploy/pulsar/aws.tf | 4 - test/modules/awsdeploy/pulsar/locals.tf | 16 - test/modules/awsdeploy/pulsar/locals.tf.dummy | 15 - test/modules/awsdeploy/pulsar/main.tf | 12 - test/modules/awsdeploy/pulsar/output.tf | 3 - test/modules/awsdeploy/pulsar/remote.tf | 7 - test/modules/awsdeploy/pulsar/vars.tf | 23 - test/modules/awsdeploy/pulsar/versions.tf | 3 - test/modules/awsdeploy/scalardl/aws.tf | 4 - test/modules/awsdeploy/scalardl/locals.tf | 29 - .../awsdeploy/scalardl/locals.tf.dummy | 30 - test/modules/awsdeploy/scalardl/main.tf | 12 - test/modules/awsdeploy/scalardl/output.tf | 27 - test/modules/awsdeploy/scalardl/remote.tf | 15 - .../awsdeploy/scalardl/terraform.tfvars | 3 - test/modules/awsdeploy/scalardl/vars.tf | 18 - test/modules/awsdeploy/scalardl/versions.tf | 3 - test/modules/azuredeploy/ca/azure.tf | 3 - test/modules/azuredeploy/ca/locals.tf | 21 - test/modules/azuredeploy/ca/locals.tf.dummy | 21 - test/modules/azuredeploy/ca/main.tf | 9 - test/modules/azuredeploy/ca/remote.tf | 7 - test/modules/azuredeploy/ca/vars.tf | 5 - test/modules/azuredeploy/ca/versions.tf | 3 - test/modules/azuredeploy/cassandra/azure.tf | 3 - test/modules/azuredeploy/cassandra/locals.tf | 21 - .../azuredeploy/cassandra/locals.tf.dummy | 21 - test/modules/azuredeploy/cassandra/main.tf | 12 - test/modules/azuredeploy/cassandra/output.tf | 19 - test/modules/azuredeploy/cassandra/remote.tf | 7 - .../azuredeploy/cassandra/terraform.tfvars | 8 - test/modules/azuredeploy/cassandra/vars.tf | 19 - .../modules/azuredeploy/cassandra/versions.tf | 3 - test/modules/azuredeploy/kubernetes/locals.tf | 16 - .../azuredeploy/kubernetes/locals.tf.dummy | 16 - test/modules/azuredeploy/kubernetes/main.tf | 12 - test/modules/azuredeploy/kubernetes/output.tf | 9 - test/modules/azuredeploy/kubernetes/remote.tf | 7 - .../azuredeploy/kubernetes/terraform.tfvars | 36 - test/modules/azuredeploy/kubernetes/vars.tf | 28 - test/modules/azuredeploy/monitor/azure.tf | 3 - test/modules/azuredeploy/monitor/locals.tf | 31 - .../azuredeploy/monitor/locals.tf.dummy | 31 - test/modules/azuredeploy/monitor/main.tf | 12 - test/modules/azuredeploy/monitor/remote.tf | 23 - test/modules/azuredeploy/monitor/vars.tf | 9 - test/modules/azuredeploy/monitor/versions.tf | 3 - .../network/additional_public_keys | 1 - test/modules/azuredeploy/network/azure.tf | 3 - test/modules/azuredeploy/network/main.tf | 15 - test/modules/azuredeploy/network/output.tf | 59 -- test/modules/azuredeploy/network/vars.tf | 34 - test/modules/azuredeploy/network/versions.tf | 3 - test/modules/azuredeploy/scalardl/azure.tf | 3 - test/modules/azuredeploy/scalardl/locals.tf | 30 - .../azuredeploy/scalardl/locals.tf.dummy | 31 - test/modules/azuredeploy/scalardl/main.tf | 12 - test/modules/azuredeploy/scalardl/output.tf | 27 - test/modules/azuredeploy/scalardl/remote.tf | 15 - .../azuredeploy/scalardl/terraform.tfvars | 3 - test/modules/azuredeploy/scalardl/vars.tf | 14 - test/modules/azuredeploy/scalardl/versions.tf | 3 - test/modules/test_key | 0 test/modules/test_key.pub | 1 - test/src/integration/.gitignore | 1 - test/src/integration/Gopkg.lock | 667 ------------------ test/src/integration/Gopkg.toml | 38 - .../src/integration/integration_alert_test.go | 214 ------ .../integration/integration_scalardl_test.go | 85 --- test/src/integration/integration_test.go | 68 -- .../integration/resources/StateReader.class | Bin 2943 -> 0 bytes .../integration/resources/StateUpdater.class | Bin 2139 -> 0 bytes test/src/integration/resources/Test-key.pem | 5 - test/src/integration/resources/Test.pem | 16 - test/src/modules/Gopkg.lock | 17 - test/src/modules/Gopkg.toml | 34 - test/src/modules/grpc_helper/grpc_helper.go | 137 ---- test/src/modules/grpc_helper/grpc_web_test.sh | 97 --- .../prometheus_helper/prometheus_helper.go | 140 ---- 111 files changed, 2866 deletions(-) delete mode 100644 test/.gitignore delete mode 100644 test/modules/awsdeploy/ca/aws.tf delete mode 100644 test/modules/awsdeploy/ca/locals.tf delete mode 100644 test/modules/awsdeploy/ca/locals.tf.dummy delete mode 100644 test/modules/awsdeploy/ca/main.tf delete mode 100644 test/modules/awsdeploy/ca/remote.tf delete mode 100644 test/modules/awsdeploy/ca/vars.tf delete mode 100644 test/modules/awsdeploy/ca/versions.tf delete mode 100644 test/modules/awsdeploy/cassandra/aws.tf delete mode 100644 test/modules/awsdeploy/cassandra/locals.tf delete mode 100644 test/modules/awsdeploy/cassandra/locals.tf.dummy delete mode 100644 test/modules/awsdeploy/cassandra/main.tf delete mode 100644 test/modules/awsdeploy/cassandra/output.tf delete mode 100644 test/modules/awsdeploy/cassandra/remote.tf delete mode 100644 test/modules/awsdeploy/cassandra/terraform.tfvars delete mode 100644 test/modules/awsdeploy/cassandra/vars.tf delete mode 100644 test/modules/awsdeploy/cassandra/versions.tf delete mode 100644 test/modules/awsdeploy/monitor/aws.tf delete mode 100644 test/modules/awsdeploy/monitor/locals.tf delete mode 100644 test/modules/awsdeploy/monitor/locals.tf.dummy delete mode 100644 test/modules/awsdeploy/monitor/main.tf delete mode 100644 test/modules/awsdeploy/monitor/remote.tf delete mode 100644 test/modules/awsdeploy/monitor/terraform.tfvars delete mode 100644 test/modules/awsdeploy/monitor/vars.tf delete mode 100644 test/modules/awsdeploy/monitor/versions.tf delete mode 100644 test/modules/awsdeploy/network/additional_public_keys delete mode 100644 test/modules/awsdeploy/network/aws.tf delete mode 100644 test/modules/awsdeploy/network/main.tf delete mode 100644 test/modules/awsdeploy/network/output.tf delete mode 100644 test/modules/awsdeploy/network/terraform.tfvars delete mode 100644 test/modules/awsdeploy/network/vars.tf delete mode 100644 test/modules/awsdeploy/network/versions.tf delete mode 100644 test/modules/awsdeploy/pulsar/aws.tf delete mode 100644 test/modules/awsdeploy/pulsar/locals.tf delete mode 100644 test/modules/awsdeploy/pulsar/locals.tf.dummy delete mode 100644 test/modules/awsdeploy/pulsar/main.tf delete mode 100644 test/modules/awsdeploy/pulsar/output.tf delete mode 100644 test/modules/awsdeploy/pulsar/remote.tf delete mode 100644 test/modules/awsdeploy/pulsar/vars.tf delete mode 100644 test/modules/awsdeploy/pulsar/versions.tf delete mode 100644 test/modules/awsdeploy/scalardl/aws.tf delete mode 100644 test/modules/awsdeploy/scalardl/locals.tf delete mode 100644 test/modules/awsdeploy/scalardl/locals.tf.dummy delete mode 100644 test/modules/awsdeploy/scalardl/main.tf delete mode 100644 test/modules/awsdeploy/scalardl/output.tf delete mode 100644 test/modules/awsdeploy/scalardl/remote.tf delete mode 100644 test/modules/awsdeploy/scalardl/terraform.tfvars delete mode 100644 test/modules/awsdeploy/scalardl/vars.tf delete mode 100644 test/modules/awsdeploy/scalardl/versions.tf delete mode 100644 test/modules/azuredeploy/ca/azure.tf delete mode 100644 test/modules/azuredeploy/ca/locals.tf delete mode 100644 test/modules/azuredeploy/ca/locals.tf.dummy delete mode 100644 test/modules/azuredeploy/ca/main.tf delete mode 100644 test/modules/azuredeploy/ca/remote.tf delete mode 100644 test/modules/azuredeploy/ca/vars.tf delete mode 100644 test/modules/azuredeploy/ca/versions.tf delete mode 100644 test/modules/azuredeploy/cassandra/azure.tf delete mode 100644 test/modules/azuredeploy/cassandra/locals.tf delete mode 100644 test/modules/azuredeploy/cassandra/locals.tf.dummy delete mode 100644 test/modules/azuredeploy/cassandra/main.tf delete mode 100644 test/modules/azuredeploy/cassandra/output.tf delete mode 100644 test/modules/azuredeploy/cassandra/remote.tf delete mode 100644 test/modules/azuredeploy/cassandra/terraform.tfvars delete mode 100644 test/modules/azuredeploy/cassandra/vars.tf delete mode 100644 test/modules/azuredeploy/cassandra/versions.tf delete mode 100644 test/modules/azuredeploy/kubernetes/locals.tf delete mode 100644 test/modules/azuredeploy/kubernetes/locals.tf.dummy delete mode 100644 test/modules/azuredeploy/kubernetes/main.tf delete mode 100644 test/modules/azuredeploy/kubernetes/output.tf delete mode 100644 test/modules/azuredeploy/kubernetes/remote.tf delete mode 100644 test/modules/azuredeploy/kubernetes/terraform.tfvars delete mode 100644 test/modules/azuredeploy/kubernetes/vars.tf delete mode 100644 test/modules/azuredeploy/monitor/azure.tf delete mode 100644 test/modules/azuredeploy/monitor/locals.tf delete mode 100644 test/modules/azuredeploy/monitor/locals.tf.dummy delete mode 100644 test/modules/azuredeploy/monitor/main.tf delete mode 100644 test/modules/azuredeploy/monitor/remote.tf delete mode 100644 test/modules/azuredeploy/monitor/vars.tf delete mode 100644 test/modules/azuredeploy/monitor/versions.tf delete mode 100644 test/modules/azuredeploy/network/additional_public_keys delete mode 100644 test/modules/azuredeploy/network/azure.tf delete mode 100644 test/modules/azuredeploy/network/main.tf delete mode 100644 test/modules/azuredeploy/network/output.tf delete mode 100644 test/modules/azuredeploy/network/vars.tf delete mode 100644 test/modules/azuredeploy/network/versions.tf delete mode 100644 test/modules/azuredeploy/scalardl/azure.tf delete mode 100644 test/modules/azuredeploy/scalardl/locals.tf delete mode 100644 test/modules/azuredeploy/scalardl/locals.tf.dummy delete mode 100644 test/modules/azuredeploy/scalardl/main.tf delete mode 100644 test/modules/azuredeploy/scalardl/output.tf delete mode 100644 test/modules/azuredeploy/scalardl/remote.tf delete mode 100644 test/modules/azuredeploy/scalardl/terraform.tfvars delete mode 100644 test/modules/azuredeploy/scalardl/vars.tf delete mode 100644 test/modules/azuredeploy/scalardl/versions.tf delete mode 100644 test/modules/test_key delete mode 100644 test/modules/test_key.pub delete mode 100644 test/src/integration/.gitignore delete mode 100644 test/src/integration/Gopkg.lock delete mode 100644 test/src/integration/Gopkg.toml delete mode 100644 test/src/integration/integration_alert_test.go delete mode 100644 test/src/integration/integration_scalardl_test.go delete mode 100644 test/src/integration/integration_test.go delete mode 100644 test/src/integration/resources/StateReader.class delete mode 100644 test/src/integration/resources/StateUpdater.class delete mode 100644 test/src/integration/resources/Test-key.pem delete mode 100644 test/src/integration/resources/Test.pem delete mode 100644 test/src/modules/Gopkg.lock delete mode 100644 test/src/modules/Gopkg.toml delete mode 100644 test/src/modules/grpc_helper/grpc_helper.go delete mode 100644 test/src/modules/grpc_helper/grpc_web_test.sh delete mode 100644 test/src/modules/prometheus_helper/prometheus_helper.go diff --git a/test/.gitignore b/test/.gitignore deleted file mode 100644 index 8a548660c..000000000 --- a/test/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -output -vendor -*.log -.vendor-new -.DS_Store -pkg -bin -.terraform -ssh.cfg diff --git a/test/modules/awsdeploy/ca/aws.tf b/test/modules/awsdeploy/ca/aws.tf deleted file mode 100644 index a10e89b66..000000000 --- a/test/modules/awsdeploy/ca/aws.tf +++ /dev/null @@ -1,4 +0,0 @@ -provider "aws" { - version = "~> 2.0" - region = var.region -} diff --git a/test/modules/awsdeploy/ca/locals.tf b/test/modules/awsdeploy/ca/locals.tf deleted file mode 100644 index ee0ee7031..000000000 --- a/test/modules/awsdeploy/ca/locals.tf +++ /dev/null @@ -1,19 +0,0 @@ -locals { - network = { - cidr = data.terraform_remote_state.network.outputs.network_cidr - name = data.terraform_remote_state.network.outputs.network_name - dns = data.terraform_remote_state.network.outputs.network_dns - id = data.terraform_remote_state.network.outputs.network_id - - subnet_ids = join(",", data.terraform_remote_state.network.outputs.subnet_map["private"]) - image_id = data.terraform_remote_state.network.outputs.image_id - key_name = data.terraform_remote_state.network.outputs.key_name - - bastion_ip = data.terraform_remote_state.network.outputs.bastion_ip - bastion_provision_id = data.terraform_remote_state.network.outputs.bastion_provision_id - - private_key_path = data.terraform_remote_state.network.outputs.private_key_path - user_name = data.terraform_remote_state.network.outputs.user_name - internal_domain = data.terraform_remote_state.network.outputs.internal_domain - } -} diff --git a/test/modules/awsdeploy/ca/locals.tf.dummy b/test/modules/awsdeploy/ca/locals.tf.dummy deleted file mode 100644 index 632fa78a5..000000000 --- a/test/modules/awsdeploy/ca/locals.tf.dummy +++ /dev/null @@ -1,19 +0,0 @@ -locals { - network = { - cidr = "10.42.0.0/16" - name = "example-aws" - dns = "Z1234567890ABCDEFGHIJ" - id = "vpc-1234567890abcdefg" - - subnet_ids = "subnet-1234567890abcdefg,subnet-1234567890hijklmn" - image_id = "ami-1234567890abcdefg" - key_name = "example-aws-xxxxxxx-key" - - bastion_ip = "111.112.113.114" - bastion_provision_id = "1234567890123456789" - - private_key_path = "../../test_key" - user_name = "centos" - internal_domain = "internal.scalar-labs.com" - } -} diff --git a/test/modules/awsdeploy/ca/main.tf b/test/modules/awsdeploy/ca/main.tf deleted file mode 100644 index 47dffeffe..000000000 --- a/test/modules/awsdeploy/ca/main.tf +++ /dev/null @@ -1,9 +0,0 @@ -module "ca" { - source = "../../../../modules/aws/ca" - - # Required Variables (Use remote state) - network = local.network - - # Optional Variables - ca = var.ca -} diff --git a/test/modules/awsdeploy/ca/remote.tf b/test/modules/awsdeploy/ca/remote.tf deleted file mode 100644 index fe1a6d737..000000000 --- a/test/modules/awsdeploy/ca/remote.tf +++ /dev/null @@ -1,7 +0,0 @@ -data "terraform_remote_state" "network" { - backend = "local" - - config = { - path = "../network/terraform.tfstate" - } -} diff --git a/test/modules/awsdeploy/ca/vars.tf b/test/modules/awsdeploy/ca/vars.tf deleted file mode 100644 index e5a7ef7cd..000000000 --- a/test/modules/awsdeploy/ca/vars.tf +++ /dev/null @@ -1,9 +0,0 @@ -# General Settings -variable "region" { - default = "ap-northeast-1" -} - -variable "ca" { - type = map - default = {} -} diff --git a/test/modules/awsdeploy/ca/versions.tf b/test/modules/awsdeploy/ca/versions.tf deleted file mode 100644 index d9b6f790b..000000000 --- a/test/modules/awsdeploy/ca/versions.tf +++ /dev/null @@ -1,3 +0,0 @@ -terraform { - required_version = ">= 0.12" -} diff --git a/test/modules/awsdeploy/cassandra/aws.tf b/test/modules/awsdeploy/cassandra/aws.tf deleted file mode 100644 index a10e89b66..000000000 --- a/test/modules/awsdeploy/cassandra/aws.tf +++ /dev/null @@ -1,4 +0,0 @@ -provider "aws" { - version = "~> 2.0" - region = var.region -} diff --git a/test/modules/awsdeploy/cassandra/locals.tf b/test/modules/awsdeploy/cassandra/locals.tf deleted file mode 100644 index 818bcf02e..000000000 --- a/test/modules/awsdeploy/cassandra/locals.tf +++ /dev/null @@ -1,20 +0,0 @@ -locals { - network = { - cidr = data.terraform_remote_state.network.outputs.network_cidr - name = data.terraform_remote_state.network.outputs.network_name - dns = data.terraform_remote_state.network.outputs.network_dns - id = data.terraform_remote_state.network.outputs.network_id - locations = join(",", data.terraform_remote_state.network.outputs.locations) - - subnet_ids = join(",", data.terraform_remote_state.network.outputs.subnet_map["cassandra"]) - image_id = data.terraform_remote_state.network.outputs.image_id - key_name = data.terraform_remote_state.network.outputs.key_name - - bastion_ip = data.terraform_remote_state.network.outputs.bastion_ip - bastion_provision_id = data.terraform_remote_state.network.outputs.bastion_provision_id - - private_key_path = data.terraform_remote_state.network.outputs.private_key_path - user_name = data.terraform_remote_state.network.outputs.user_name - internal_domain = data.terraform_remote_state.network.outputs.internal_domain - } -} diff --git a/test/modules/awsdeploy/cassandra/locals.tf.dummy b/test/modules/awsdeploy/cassandra/locals.tf.dummy deleted file mode 100644 index 6df034e4d..000000000 --- a/test/modules/awsdeploy/cassandra/locals.tf.dummy +++ /dev/null @@ -1,20 +0,0 @@ -locals { - network = { - cidr = "10.42.0.0/16" - name = "example-aws" - dns = "Z1234567890ABCDEFGHIJ" - id = "vpc-1234567890abcdefg" - locations = "ap-northeast-1c,ap-northeast-1a" - - subnet_ids = "subnet-1234567890abcdefg,subnet-1234567890hijklmn" - image_id = "ami-1234567890abcdefg" - key_name = "example-aws-xxxxxxx-key" - - bastion_ip = "111.112.113.114" - bastion_provision_id = "1234567890123456789" - - private_key_path = "../../test.pem" - user_name = "centos" - internal_domain = "internal.scalar-labs.com" - } -} diff --git a/test/modules/awsdeploy/cassandra/main.tf b/test/modules/awsdeploy/cassandra/main.tf deleted file mode 100644 index c9f78d5fc..000000000 --- a/test/modules/awsdeploy/cassandra/main.tf +++ /dev/null @@ -1,12 +0,0 @@ -module "cassandra" { - source = "../../../../modules/aws/cassandra" - - # Required Variables (Use network remote state) - network = local.network - - # Optional Variables - base = var.base - cassandra = var.cassandra - cassy = var.cassy - reaper = var.reaper -} diff --git a/test/modules/awsdeploy/cassandra/output.tf b/test/modules/awsdeploy/cassandra/output.tf deleted file mode 100644 index 277c9e25b..000000000 --- a/test/modules/awsdeploy/cassandra/output.tf +++ /dev/null @@ -1,19 +0,0 @@ -output "cassandra_resource_count" { - value = module.cassandra.cassandra_resource_count -} - -output "cassandra_provision_ids" { - value = module.cassandra.cassandra_provision_ids -} - -output "cassandra_start_on_initial_boot" { - value = module.cassandra.cassandra_start_on_initial_boot -} - -output "cassandra_test_ip_0" { - value = module.cassandra.cassandra_host_ips[0] -} - -output "cassandra_test_ip_1" { - value = module.cassandra.cassandra_host_ips[1] -} diff --git a/test/modules/awsdeploy/cassandra/remote.tf b/test/modules/awsdeploy/cassandra/remote.tf deleted file mode 100644 index fe1a6d737..000000000 --- a/test/modules/awsdeploy/cassandra/remote.tf +++ /dev/null @@ -1,7 +0,0 @@ -data "terraform_remote_state" "network" { - backend = "local" - - config = { - path = "../network/terraform.tfstate" - } -} diff --git a/test/modules/awsdeploy/cassandra/terraform.tfvars b/test/modules/awsdeploy/cassandra/terraform.tfvars deleted file mode 100644 index 9b096c24d..000000000 --- a/test/modules/awsdeploy/cassandra/terraform.tfvars +++ /dev/null @@ -1,11 +0,0 @@ -region = "us-east-1" - -cassandra = { - start_on_initial_boot = true -} - -cassy = { - resource_root_volume_size = 16 - storage_base_uri = "s3://scalar-terraform-test" - storage_type = "aws_s3" -} diff --git a/test/modules/awsdeploy/cassandra/vars.tf b/test/modules/awsdeploy/cassandra/vars.tf deleted file mode 100644 index b0b6d0ad6..000000000 --- a/test/modules/awsdeploy/cassandra/vars.tf +++ /dev/null @@ -1,23 +0,0 @@ -# General Settings -variable "region" { - default = "ap-northeast-1" -} - -variable "base" { - default = "default" -} - -variable "cassandra" { - type = map - default = {} -} - -variable "cassy" { - type = map - default = {} -} - -variable "reaper" { - type = map - default = {} -} diff --git a/test/modules/awsdeploy/cassandra/versions.tf b/test/modules/awsdeploy/cassandra/versions.tf deleted file mode 100644 index d9b6f790b..000000000 --- a/test/modules/awsdeploy/cassandra/versions.tf +++ /dev/null @@ -1,3 +0,0 @@ -terraform { - required_version = ">= 0.12" -} diff --git a/test/modules/awsdeploy/monitor/aws.tf b/test/modules/awsdeploy/monitor/aws.tf deleted file mode 100644 index a10e89b66..000000000 --- a/test/modules/awsdeploy/monitor/aws.tf +++ /dev/null @@ -1,4 +0,0 @@ -provider "aws" { - version = "~> 2.0" - region = var.region -} diff --git a/test/modules/awsdeploy/monitor/locals.tf b/test/modules/awsdeploy/monitor/locals.tf deleted file mode 100644 index b32e00a0b..000000000 --- a/test/modules/awsdeploy/monitor/locals.tf +++ /dev/null @@ -1,31 +0,0 @@ -locals { - network = { - cidr = data.terraform_remote_state.network.outputs.network_cidr - name = data.terraform_remote_state.network.outputs.network_name - dns = data.terraform_remote_state.network.outputs.network_dns - id = data.terraform_remote_state.network.outputs.network_id - region = data.terraform_remote_state.network.outputs.region - locations = join(",", data.terraform_remote_state.network.outputs.locations) - - subnet_ids = join(",", data.terraform_remote_state.network.outputs.subnet_map["private"]) - image_id = data.terraform_remote_state.network.outputs.image_id - key_name = data.terraform_remote_state.network.outputs.key_name - - bastion_ip = data.terraform_remote_state.network.outputs.bastion_ip - bastion_provision_id = data.terraform_remote_state.network.outputs.bastion_provision_id - - private_key_path = data.terraform_remote_state.network.outputs.private_key_path - user_name = data.terraform_remote_state.network.outputs.user_name - internal_domain = data.terraform_remote_state.network.outputs.internal_domain - } - - cassandra = { - resource_count = data.terraform_remote_state.cassandra.outputs.cassandra_resource_count - } - - scalardl = { - blue_resource_count = data.terraform_remote_state.scalardl.outputs.scalardl_blue_resource_count - green_resource_count = data.terraform_remote_state.scalardl.outputs.scalardl_green_resource_count - replication_factor = data.terraform_remote_state.scalardl.outputs.scalardl_replication_factor - } -} diff --git a/test/modules/awsdeploy/monitor/locals.tf.dummy b/test/modules/awsdeploy/monitor/locals.tf.dummy deleted file mode 100644 index 74558f1a3..000000000 --- a/test/modules/awsdeploy/monitor/locals.tf.dummy +++ /dev/null @@ -1,31 +0,0 @@ -locals { - network = { - cidr = "10.42.0.0/16" - name = "example-aws" - dns = "Z1234567890ABCDEFGHIJ" - id = "vpc-1234567890abcdefg" - region = "ap-northeast-1" - locations = "ap-northeast-1c,ap-northeast-1a" - - subnet_ids = "subnet-1234567890abcdefg,subnet-1234567890hijklmn" - image_id = "ami-1234567890abcdefg" - key_name = "example-aws-xxxxxxx-key" - - bastion_ip = "111.112.113.114" - bastion_provision_id = "1234567890123456789" - - private_key_path = "../../test.pem" - user_name = "centos" - internal_domain = "internal.scalar-labs.com" - } - - cassandra = { - resource_count = 3 - } - - scalardl = { - blue_resource_count = 3 - green_resource_count = 0 - replication_factor = 3 - } -} diff --git a/test/modules/awsdeploy/monitor/main.tf b/test/modules/awsdeploy/monitor/main.tf deleted file mode 100644 index 3377a6661..000000000 --- a/test/modules/awsdeploy/monitor/main.tf +++ /dev/null @@ -1,14 +0,0 @@ -module "monitor" { - source = "../../../../modules/aws/monitor" - - # Required Variables (Use remote state) - network = local.network - cassandra = local.cassandra - scalardl = local.scalardl - - # Optional Variables - base = var.base - monitor = var.monitor - - slack_webhook_url = var.slack_webhook_url -} diff --git a/test/modules/awsdeploy/monitor/remote.tf b/test/modules/awsdeploy/monitor/remote.tf deleted file mode 100644 index 3defb6dca..000000000 --- a/test/modules/awsdeploy/monitor/remote.tf +++ /dev/null @@ -1,23 +0,0 @@ -data "terraform_remote_state" "network" { - backend = "local" - - config = { - path = "../network/terraform.tfstate" - } -} - -data "terraform_remote_state" "cassandra" { - backend = "local" - - config = { - path = "../cassandra/terraform.tfstate" - } -} - -data "terraform_remote_state" "scalardl" { - backend = "local" - - config = { - path = "../scalardl/terraform.tfstate" - } -} diff --git a/test/modules/awsdeploy/monitor/terraform.tfvars b/test/modules/awsdeploy/monitor/terraform.tfvars deleted file mode 100644 index 0f2295a88..000000000 --- a/test/modules/awsdeploy/monitor/terraform.tfvars +++ /dev/null @@ -1,6 +0,0 @@ -region = "us-east-1" - -monitor = { - resource_type = "t3.medium" - resource_root_volume_size = 16 -} diff --git a/test/modules/awsdeploy/monitor/vars.tf b/test/modules/awsdeploy/monitor/vars.tf deleted file mode 100644 index 3a4457ebf..000000000 --- a/test/modules/awsdeploy/monitor/vars.tf +++ /dev/null @@ -1,18 +0,0 @@ -# General Settings -variable "region" { - default = "ap-northeast-1" -} - -variable "base" { - default = "default" -} - -variable "monitor" { - type = map - default = {} -} - -# For Alerting Add Slack Webhook -variable "slack_webhook_url" { - default = "" -} diff --git a/test/modules/awsdeploy/monitor/versions.tf b/test/modules/awsdeploy/monitor/versions.tf deleted file mode 100644 index d9b6f790b..000000000 --- a/test/modules/awsdeploy/monitor/versions.tf +++ /dev/null @@ -1,3 +0,0 @@ -terraform { - required_version = ">= 0.12" -} diff --git a/test/modules/awsdeploy/network/additional_public_keys b/test/modules/awsdeploy/network/additional_public_keys deleted file mode 100644 index cf52d65d9..000000000 --- a/test/modules/awsdeploy/network/additional_public_keys +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDntN1I8GDY4VGvZM1A6nIVWR3ZjEMTXOhhD7BbnhVjGM4Qnffz+XNiOG2z/tTnkLO6q2uckxTUr3EokVenXCiSGXAgDl0L4134vyiLpUtWS+RwqfSfJHNuCBGoaC1Srt8bUZ/ltemz/xChjPrC3E0pIJssV9fGZtOnJ+eRxEIyc8BxY3zsTGqEnl7s2ybTkFDj0kUJsSn0SaJUNTet9nQOFWr93UsvnRrcNDos3WdTw+WBU9FA+54picqZLQz9JXgHoj8ehEaN7yjGeHpUBCX7uLUFXKLdw6K0ZrOuPu648bRyPV1A3JJF/z1kYwZwgMF3bPlYl/qd+tNolpvwgDn5 test-key \ No newline at end of file diff --git a/test/modules/awsdeploy/network/aws.tf b/test/modules/awsdeploy/network/aws.tf deleted file mode 100644 index a10e89b66..000000000 --- a/test/modules/awsdeploy/network/aws.tf +++ /dev/null @@ -1,4 +0,0 @@ -provider "aws" { - version = "~> 2.0" - region = var.region -} diff --git a/test/modules/awsdeploy/network/main.tf b/test/modules/awsdeploy/network/main.tf deleted file mode 100644 index a030d888d..000000000 --- a/test/modules/awsdeploy/network/main.tf +++ /dev/null @@ -1,14 +0,0 @@ -module "network" { - source = "../../../../modules/aws/network" - - # Required Variables - name = var.name - locations = var.locations - public_key_path = var.public_key_path - private_key_path = var.private_key_path - additional_public_keys_path = var.additional_public_keys_path - internal_domain = var.internal_domain - - # Optional Variables - network = var.network -} diff --git a/test/modules/awsdeploy/network/output.tf b/test/modules/awsdeploy/network/output.tf deleted file mode 100644 index 04422700b..000000000 --- a/test/modules/awsdeploy/network/output.tf +++ /dev/null @@ -1,59 +0,0 @@ -output "bastion_ip" { - value = module.network.bastion_ip -} - -output "network_cidr" { - value = module.network.network_cidr -} - -output "network_name" { - value = module.network.network_name -} - -output "network_dns" { - value = module.network.network_dns -} - -output "network_id" { - value = module.network.network_id -} - -output "subnet_map" { - value = module.network.subnet_map -} - -output "image_id" { - value = module.network.image_id -} - -output "bastion_provision_id" { - value = module.network.bastion_provision_id -} - -output "key_name" { - value = module.network.key_name -} - -output "region" { - value = var.region -} - -output "locations" { - value = module.network.locations -} - -output "user_name" { - value = module.network.user_name -} - -output "private_key_path" { - value = module.network.private_key_path -} - -output "ssh_config" { - value = module.network.ssh_config -} - -output "internal_domain" { - value = module.network.internal_domain -} diff --git a/test/modules/awsdeploy/network/terraform.tfvars b/test/modules/awsdeploy/network/terraform.tfvars deleted file mode 100644 index 716744d67..000000000 --- a/test/modules/awsdeploy/network/terraform.tfvars +++ /dev/null @@ -1,21 +0,0 @@ -region = "us-east-1" - -name = "Terratest" - -locations = [ - "us-east-1a", - "us-east-1c", -] - -public_key_path = "../../test_key.pub" - -private_key_path = "../../test_key" - -additional_public_keys_path = "./additional_public_keys" - -internal_domain = "internal.scalar-labs.com" - -network = { - bastion_resource_count = "1" - bastion_resource_type = "t3.large" -} diff --git a/test/modules/awsdeploy/network/vars.tf b/test/modules/awsdeploy/network/vars.tf deleted file mode 100644 index f908e3824..000000000 --- a/test/modules/awsdeploy/network/vars.tf +++ /dev/null @@ -1,21 +0,0 @@ -# General Settings -variable "region" {} - -variable "name" {} - -variable "locations" { - type = list(string) -} - -variable "public_key_path" {} - -variable "private_key_path" {} - -variable "internal_domain" {} - -variable "additional_public_keys_path" {} - -variable "network" { - type = map - default = {} -} diff --git a/test/modules/awsdeploy/network/versions.tf b/test/modules/awsdeploy/network/versions.tf deleted file mode 100644 index d9b6f790b..000000000 --- a/test/modules/awsdeploy/network/versions.tf +++ /dev/null @@ -1,3 +0,0 @@ -terraform { - required_version = ">= 0.12" -} diff --git a/test/modules/awsdeploy/pulsar/aws.tf b/test/modules/awsdeploy/pulsar/aws.tf deleted file mode 100644 index a10e89b66..000000000 --- a/test/modules/awsdeploy/pulsar/aws.tf +++ /dev/null @@ -1,4 +0,0 @@ -provider "aws" { - version = "~> 2.0" - region = var.region -} diff --git a/test/modules/awsdeploy/pulsar/locals.tf b/test/modules/awsdeploy/pulsar/locals.tf deleted file mode 100644 index b259dc9c3..000000000 --- a/test/modules/awsdeploy/pulsar/locals.tf +++ /dev/null @@ -1,16 +0,0 @@ -locals { - network = { - cidr = data.terraform_remote_state.network.outputs.network_cidr - name = data.terraform_remote_state.network.outputs.network_name - dns = data.terraform_remote_state.network.outputs.network_dns - id = data.terraform_remote_state.network.outputs.network_id - - locations = join(",", data.terraform_remote_state.network.outputs.locations) - subnet_ids = join(",", data.terraform_remote_state.network.outputs.subnet_map["pulsar"]) - image_id = data.terraform_remote_state.network.outputs.image_id - key_name = data.terraform_remote_state.network.outputs.key_name - - internal_domain = data.terraform_remote_state.network.outputs.internal_domain - - } -} diff --git a/test/modules/awsdeploy/pulsar/locals.tf.dummy b/test/modules/awsdeploy/pulsar/locals.tf.dummy deleted file mode 100644 index afa77facc..000000000 --- a/test/modules/awsdeploy/pulsar/locals.tf.dummy +++ /dev/null @@ -1,15 +0,0 @@ -locals { - network = { - cidr = "10.42.0.0/16" - name = "example-aws" - dns = "Z08111302BU37G0O8OMMY" - id = "vpc-08f36c547a1aca222" - - locations = "ap-northeast-1c,ap-northeast-1a" - subnet_ids = "subnet-1234567890abcdefg,subnet-1234567890hijklmn" - image_id = "ami-0d9d854feeddeef21" - key_name = "example-aws-xxxxxxx-key" - - internal_domain = "internal.scalar-labs.com" - } -} diff --git a/test/modules/awsdeploy/pulsar/main.tf b/test/modules/awsdeploy/pulsar/main.tf deleted file mode 100644 index e5b223029..000000000 --- a/test/modules/awsdeploy/pulsar/main.tf +++ /dev/null @@ -1,12 +0,0 @@ -module "pulsar" { - source = "../../../../modules/aws/pulsar" - - # Required Variables (Use network remote state) - network = local.network - - # Optional Variables - base = var.base - bookie = var.bookie - broker = var.broker - zookeeper = var.zookeeper -} diff --git a/test/modules/awsdeploy/pulsar/output.tf b/test/modules/awsdeploy/pulsar/output.tf deleted file mode 100644 index 2900c4a00..000000000 --- a/test/modules/awsdeploy/pulsar/output.tf +++ /dev/null @@ -1,3 +0,0 @@ -output "inventory_ini" { - value = module.pulsar.inventory_ini -} diff --git a/test/modules/awsdeploy/pulsar/remote.tf b/test/modules/awsdeploy/pulsar/remote.tf deleted file mode 100644 index fe1a6d737..000000000 --- a/test/modules/awsdeploy/pulsar/remote.tf +++ /dev/null @@ -1,7 +0,0 @@ -data "terraform_remote_state" "network" { - backend = "local" - - config = { - path = "../network/terraform.tfstate" - } -} diff --git a/test/modules/awsdeploy/pulsar/vars.tf b/test/modules/awsdeploy/pulsar/vars.tf deleted file mode 100644 index 8bc41efc8..000000000 --- a/test/modules/awsdeploy/pulsar/vars.tf +++ /dev/null @@ -1,23 +0,0 @@ -# General Settings -variable "region" { - default = "us-east-1" -} - -variable "base" { - default = "default" -} - -variable "bookie" { - type = map - default = {} -} - -variable "broker" { - type = map - default = {} -} - -variable "zookeeper" { - type = map - default = {} -} diff --git a/test/modules/awsdeploy/pulsar/versions.tf b/test/modules/awsdeploy/pulsar/versions.tf deleted file mode 100644 index d9b6f790b..000000000 --- a/test/modules/awsdeploy/pulsar/versions.tf +++ /dev/null @@ -1,3 +0,0 @@ -terraform { - required_version = ">= 0.12" -} diff --git a/test/modules/awsdeploy/scalardl/aws.tf b/test/modules/awsdeploy/scalardl/aws.tf deleted file mode 100644 index a10e89b66..000000000 --- a/test/modules/awsdeploy/scalardl/aws.tf +++ /dev/null @@ -1,4 +0,0 @@ -provider "aws" { - version = "~> 2.0" - region = var.region -} diff --git a/test/modules/awsdeploy/scalardl/locals.tf b/test/modules/awsdeploy/scalardl/locals.tf deleted file mode 100644 index eebcbf0ae..000000000 --- a/test/modules/awsdeploy/scalardl/locals.tf +++ /dev/null @@ -1,29 +0,0 @@ -locals { - network = { - cidr = data.terraform_remote_state.network.outputs.network_cidr - name = data.terraform_remote_state.network.outputs.network_name - dns = data.terraform_remote_state.network.outputs.network_dns - id = data.terraform_remote_state.network.outputs.network_id - locations = join(",", data.terraform_remote_state.network.outputs.locations) - - image_id = data.terraform_remote_state.network.outputs.image_id - key_name = data.terraform_remote_state.network.outputs.key_name - - bastion_ip = data.terraform_remote_state.network.outputs.bastion_ip - bastion_provision_id = data.terraform_remote_state.network.outputs.bastion_provision_id - - private_key_path = data.terraform_remote_state.network.outputs.private_key_path - user_name = data.terraform_remote_state.network.outputs.user_name - internal_domain = data.terraform_remote_state.network.outputs.internal_domain - - public_subnet_ids = join(",", data.terraform_remote_state.network.outputs.subnet_map["public"]) - private_subnet_ids = join(",", data.terraform_remote_state.network.outputs.subnet_map["private"]) - blue_subnet_ids = join(",", data.terraform_remote_state.network.outputs.subnet_map["scalardl_blue"]) - green_subnet_ids = join(",", data.terraform_remote_state.network.outputs.subnet_map["scalardl_green"]) - } - - cassandra = { - start_on_initial_boot = data.terraform_remote_state.cassandra.outputs.cassandra_start_on_initial_boot - provision_ids = join(",", data.terraform_remote_state.cassandra.outputs.cassandra_provision_ids) - } -} diff --git a/test/modules/awsdeploy/scalardl/locals.tf.dummy b/test/modules/awsdeploy/scalardl/locals.tf.dummy deleted file mode 100644 index 5a33d565f..000000000 --- a/test/modules/awsdeploy/scalardl/locals.tf.dummy +++ /dev/null @@ -1,30 +0,0 @@ -locals { - network = { - cidr = "10.42.0.0/16" - name = "example-aws" - dns = "Z08111302BU37G0O8OMMY" - id = "vpc-08f36c547a1aca222" - locations = "ap-northeast-1c,ap-northeast-1a" - - subnet_ids = "subnet-1234567890abcdefg,subnet-1234567890hijklmn" - image_id = "ami-0d9d854feeddeef21" - key_name = "example-aws-xxxxxxx-key" - - bastion_ip = "13.231.179.116" - bastion_provision_id = "9139872180792820156" - - private_key_path = "../../test.pem" - user_name = "centos" - internal_domain = "internal.scalar-labs.com" - - public_subnet_ids = "subnet-0fcdd0a1f75e86b1f,subnet-1fcdd0a1f75e86b1f" - private_subnet_ids = "subnet-0fcdd0a1f75e86b1g,subnet-1fcdd0a1f75e86b1g" - blue_subnet_ids = "subnet-0fcdd0a1f75e86b1h,subnet-1fcdd0a1f75e86b1h" - green_subnet_ids = "subnet-0fcdd0a1f75e86b1i,subnet-1fcdd0a1f75e86b1i" - } - - cassandra = { - start_on_initial_boot = false - provision_ids = "6806549857469577823" - } -} diff --git a/test/modules/awsdeploy/scalardl/main.tf b/test/modules/awsdeploy/scalardl/main.tf deleted file mode 100644 index fc740cc0b..000000000 --- a/test/modules/awsdeploy/scalardl/main.tf +++ /dev/null @@ -1,12 +0,0 @@ -module "scalardl" { - source = "../../../../modules/aws/scalardl" - - # Required Variables (Use remote state) - network = local.network - cassandra = local.cassandra - - # Optional Variables - base = var.base - scalardl = var.scalardl - envoy = var.envoy -} diff --git a/test/modules/awsdeploy/scalardl/output.tf b/test/modules/awsdeploy/scalardl/output.tf deleted file mode 100644 index 7d5392069..000000000 --- a/test/modules/awsdeploy/scalardl/output.tf +++ /dev/null @@ -1,27 +0,0 @@ -output "scalardl_blue_resource_count" { - value = module.scalardl.scalardl_blue_resource_count -} - -output "scalardl_green_resource_count" { - value = module.scalardl.scalardl_green_resource_count -} - -output "scalardl_replication_factor" { - value = module.scalardl.scalardl_replication_factor -} - -output "scalar_dns" { - value = module.scalardl.envoy_dns[0] -} - -output "monitor_url" { - value = "http://${module.scalardl.envoy_dns[0]}:${module.scalardl.envoy_listen_port}" -} - -output "scalardl_blue_test_ip_0" { - value = module.scalardl.blue_scalardl_ips[0] -} - -output "scalardl_blue_test_ip_1" { - value = module.scalardl.blue_scalardl_ips[1] -} diff --git a/test/modules/awsdeploy/scalardl/remote.tf b/test/modules/awsdeploy/scalardl/remote.tf deleted file mode 100644 index 8db871f06..000000000 --- a/test/modules/awsdeploy/scalardl/remote.tf +++ /dev/null @@ -1,15 +0,0 @@ -data "terraform_remote_state" "network" { - backend = "local" - - config = { - path = "../network/terraform.tfstate" - } -} - -data "terraform_remote_state" "cassandra" { - backend = "local" - - config = { - path = "../cassandra/terraform.tfstate" - } -} diff --git a/test/modules/awsdeploy/scalardl/terraform.tfvars b/test/modules/awsdeploy/scalardl/terraform.tfvars deleted file mode 100644 index 776039655..000000000 --- a/test/modules/awsdeploy/scalardl/terraform.tfvars +++ /dev/null @@ -1,3 +0,0 @@ -envoy = { - nlb_internal = "false" -} diff --git a/test/modules/awsdeploy/scalardl/vars.tf b/test/modules/awsdeploy/scalardl/vars.tf deleted file mode 100644 index 7c6b80aec..000000000 --- a/test/modules/awsdeploy/scalardl/vars.tf +++ /dev/null @@ -1,18 +0,0 @@ -# General Settings -variable "region" { - default = "us-east-1" -} - -variable "base" { - default = "default" -} - -variable "scalardl" { - type = map - default = {} -} - -variable "envoy" { - type = map - default = {} -} diff --git a/test/modules/awsdeploy/scalardl/versions.tf b/test/modules/awsdeploy/scalardl/versions.tf deleted file mode 100644 index d9b6f790b..000000000 --- a/test/modules/awsdeploy/scalardl/versions.tf +++ /dev/null @@ -1,3 +0,0 @@ -terraform { - required_version = ">= 0.12" -} diff --git a/test/modules/azuredeploy/ca/azure.tf b/test/modules/azuredeploy/ca/azure.tf deleted file mode 100644 index 8ec729873..000000000 --- a/test/modules/azuredeploy/ca/azure.tf +++ /dev/null @@ -1,3 +0,0 @@ -provider "azurerm" { - version = "=1.38.0" -} diff --git a/test/modules/azuredeploy/ca/locals.tf b/test/modules/azuredeploy/ca/locals.tf deleted file mode 100644 index 0243e287d..000000000 --- a/test/modules/azuredeploy/ca/locals.tf +++ /dev/null @@ -1,21 +0,0 @@ -locals { - network = { - cidr = data.terraform_remote_state.network.outputs.network_cidr - name = data.terraform_remote_state.network.outputs.network_name - dns = data.terraform_remote_state.network.outputs.dns_zone_id - id = data.terraform_remote_state.network.outputs.network_id - region = data.terraform_remote_state.network.outputs.region - locations = join(",", data.terraform_remote_state.network.outputs.locations) - - subnet_id = data.terraform_remote_state.network.outputs.subnet_map["private"] - image_id = data.terraform_remote_state.network.outputs.image_id - - bastion_ip = data.terraform_remote_state.network.outputs.bastion_ip - bastion_provision_id = data.terraform_remote_state.network.outputs.bastion_provision_id - - public_key_path = data.terraform_remote_state.network.outputs.public_key_path - private_key_path = data.terraform_remote_state.network.outputs.private_key_path - user_name = data.terraform_remote_state.network.outputs.user_name - internal_domain = data.terraform_remote_state.network.outputs.internal_domain - } -} diff --git a/test/modules/azuredeploy/ca/locals.tf.dummy b/test/modules/azuredeploy/ca/locals.tf.dummy deleted file mode 100644 index 632374bfa..000000000 --- a/test/modules/azuredeploy/ca/locals.tf.dummy +++ /dev/null @@ -1,21 +0,0 @@ -locals { - network = { - cidr = "10.42.0.0/16" - name = "example-azure" - dns = "internal.scalar-labs.com" - id = "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/example-azure-6qkpmqe/providers/Microsoft.Network/virtualNetworks/example-azure-6qkpmqe" - region = "japaneast" - locations = "" - - subnet_id = "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/example-azure-6qkpmqe/providers/Microsoft.Network/virtualNetworks/example-azure-6qkpmqe/subnets/private" - image_id = "CentOS" - - bastion_ip = "111.112.113.114" - bastion_provision_id = "1234567890123456789" - - public_key_path = "../../test_key.pub" - private_key_path = "../../test_key" - user_name = "centos" - internal_domain = "internal.scalar-labs.com" - } -} diff --git a/test/modules/azuredeploy/ca/main.tf b/test/modules/azuredeploy/ca/main.tf deleted file mode 100644 index d2ced4b4a..000000000 --- a/test/modules/azuredeploy/ca/main.tf +++ /dev/null @@ -1,9 +0,0 @@ -module "ca" { - source = "../../../../modules/azure/ca" - - # Required Variables (Use remote state) - network = local.network - - # Optional Variables - ca = var.ca -} diff --git a/test/modules/azuredeploy/ca/remote.tf b/test/modules/azuredeploy/ca/remote.tf deleted file mode 100644 index fe1a6d737..000000000 --- a/test/modules/azuredeploy/ca/remote.tf +++ /dev/null @@ -1,7 +0,0 @@ -data "terraform_remote_state" "network" { - backend = "local" - - config = { - path = "../network/terraform.tfstate" - } -} diff --git a/test/modules/azuredeploy/ca/vars.tf b/test/modules/azuredeploy/ca/vars.tf deleted file mode 100644 index 1763469ef..000000000 --- a/test/modules/azuredeploy/ca/vars.tf +++ /dev/null @@ -1,5 +0,0 @@ -# General Settings -variable "ca" { - type = map - default = {} -} diff --git a/test/modules/azuredeploy/ca/versions.tf b/test/modules/azuredeploy/ca/versions.tf deleted file mode 100644 index d9b6f790b..000000000 --- a/test/modules/azuredeploy/ca/versions.tf +++ /dev/null @@ -1,3 +0,0 @@ -terraform { - required_version = ">= 0.12" -} diff --git a/test/modules/azuredeploy/cassandra/azure.tf b/test/modules/azuredeploy/cassandra/azure.tf deleted file mode 100644 index 8ec729873..000000000 --- a/test/modules/azuredeploy/cassandra/azure.tf +++ /dev/null @@ -1,3 +0,0 @@ -provider "azurerm" { - version = "=1.38.0" -} diff --git a/test/modules/azuredeploy/cassandra/locals.tf b/test/modules/azuredeploy/cassandra/locals.tf deleted file mode 100644 index 097bc5208..000000000 --- a/test/modules/azuredeploy/cassandra/locals.tf +++ /dev/null @@ -1,21 +0,0 @@ -locals { - network = { - cidr = data.terraform_remote_state.network.outputs.network_cidr - name = data.terraform_remote_state.network.outputs.network_name - dns = data.terraform_remote_state.network.outputs.dns_zone_id - id = data.terraform_remote_state.network.outputs.network_id - region = data.terraform_remote_state.network.outputs.region - locations = join(",", data.terraform_remote_state.network.outputs.locations) - - subnet_id = data.terraform_remote_state.network.outputs.subnet_map["cassandra"] - image_id = data.terraform_remote_state.network.outputs.image_id - - bastion_ip = data.terraform_remote_state.network.outputs.bastion_ip - bastion_provision_id = data.terraform_remote_state.network.outputs.bastion_provision_id - - public_key_path = data.terraform_remote_state.network.outputs.public_key_path - private_key_path = data.terraform_remote_state.network.outputs.private_key_path - user_name = data.terraform_remote_state.network.outputs.user_name - internal_domain = data.terraform_remote_state.network.outputs.internal_domain - } -} diff --git a/test/modules/azuredeploy/cassandra/locals.tf.dummy b/test/modules/azuredeploy/cassandra/locals.tf.dummy deleted file mode 100644 index d45b645d7..000000000 --- a/test/modules/azuredeploy/cassandra/locals.tf.dummy +++ /dev/null @@ -1,21 +0,0 @@ -locals { - network = { - cidr = "10.42.0.0/16" - name = "example-azure" - dns = "internal.scalar-labs.com" - id = "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/example-azure-6qkpmqe/providers/Microsoft.Network/virtualNetworks/example-azure-6qkpmqe" - region = "japaneast" - locations = "" - - subnet_id = "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/example-azure-6qkpmqe/providers/Microsoft.Network/virtualNetworks/example-azure-6qkpmqe/subnets/cassandra" - image_id = "CentOS" - - bastion_ip = "111.112.113.114" - bastion_provision_id = "1234567890123456789" - - public_key_path = "../../test_key.pub" - private_key_path = "../../test_key" - user_name = "centos" - internal_domain = "internal.scalar-labs.com" - } -} diff --git a/test/modules/azuredeploy/cassandra/main.tf b/test/modules/azuredeploy/cassandra/main.tf deleted file mode 100644 index c32715d64..000000000 --- a/test/modules/azuredeploy/cassandra/main.tf +++ /dev/null @@ -1,12 +0,0 @@ -module "cassandra" { - source = "../../../../modules/azure/cassandra" - - # Required Variables (Use network remote state) - network = local.network - - # Optional Variables - base = var.base - cassandra = var.cassandra - cassy = var.cassy - reaper = var.reaper -} diff --git a/test/modules/azuredeploy/cassandra/output.tf b/test/modules/azuredeploy/cassandra/output.tf deleted file mode 100644 index 277c9e25b..000000000 --- a/test/modules/azuredeploy/cassandra/output.tf +++ /dev/null @@ -1,19 +0,0 @@ -output "cassandra_resource_count" { - value = module.cassandra.cassandra_resource_count -} - -output "cassandra_provision_ids" { - value = module.cassandra.cassandra_provision_ids -} - -output "cassandra_start_on_initial_boot" { - value = module.cassandra.cassandra_start_on_initial_boot -} - -output "cassandra_test_ip_0" { - value = module.cassandra.cassandra_host_ips[0] -} - -output "cassandra_test_ip_1" { - value = module.cassandra.cassandra_host_ips[1] -} diff --git a/test/modules/azuredeploy/cassandra/remote.tf b/test/modules/azuredeploy/cassandra/remote.tf deleted file mode 100644 index fe1a6d737..000000000 --- a/test/modules/azuredeploy/cassandra/remote.tf +++ /dev/null @@ -1,7 +0,0 @@ -data "terraform_remote_state" "network" { - backend = "local" - - config = { - path = "../network/terraform.tfstate" - } -} diff --git a/test/modules/azuredeploy/cassandra/terraform.tfvars b/test/modules/azuredeploy/cassandra/terraform.tfvars deleted file mode 100644 index 256decd27..000000000 --- a/test/modules/azuredeploy/cassandra/terraform.tfvars +++ /dev/null @@ -1,8 +0,0 @@ -cassandra = { - start_on_initial_boot = true -} - -cassy = { - resource_root_volume_size = "16" - use_managed_identity = "false" -} diff --git a/test/modules/azuredeploy/cassandra/vars.tf b/test/modules/azuredeploy/cassandra/vars.tf deleted file mode 100644 index 0083cb4df..000000000 --- a/test/modules/azuredeploy/cassandra/vars.tf +++ /dev/null @@ -1,19 +0,0 @@ -# General Settings -variable "base" { - default = "default" -} - -variable "cassandra" { - type = map - default = {} -} - -variable "cassy" { - type = map - default = {} -} - -variable "reaper" { - type = map - default = {} -} diff --git a/test/modules/azuredeploy/cassandra/versions.tf b/test/modules/azuredeploy/cassandra/versions.tf deleted file mode 100644 index d9b6f790b..000000000 --- a/test/modules/azuredeploy/cassandra/versions.tf +++ /dev/null @@ -1,3 +0,0 @@ -terraform { - required_version = ">= 0.12" -} diff --git a/test/modules/azuredeploy/kubernetes/locals.tf b/test/modules/azuredeploy/kubernetes/locals.tf deleted file mode 100644 index d0eb139ec..000000000 --- a/test/modules/azuredeploy/kubernetes/locals.tf +++ /dev/null @@ -1,16 +0,0 @@ -locals { - network = { - name = data.terraform_remote_state.network.outputs.network_name - dns = data.terraform_remote_state.network.outputs.dns_zone_id - id = data.terraform_remote_state.network.outputs.network_id - region = data.terraform_remote_state.network.outputs.region - cidr = data.terraform_remote_state.network.outputs.network_cidr - locations = join(",", data.terraform_remote_state.network.outputs.locations) - - bastion_ip = data.terraform_remote_state.network.outputs.bastion_ip - user_name = data.terraform_remote_state.network.outputs.user_name - - public_key_path = data.terraform_remote_state.network.outputs.public_key_path - internal_domain = data.terraform_remote_state.network.outputs.internal_domain - } -} diff --git a/test/modules/azuredeploy/kubernetes/locals.tf.dummy b/test/modules/azuredeploy/kubernetes/locals.tf.dummy deleted file mode 100644 index a7e3517d8..000000000 --- a/test/modules/azuredeploy/kubernetes/locals.tf.dummy +++ /dev/null @@ -1,16 +0,0 @@ -locals { - network = { - name = "example-k8s-azure" - dns = "internal.scalar-labs.com" - id = "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/example-azure-6qkpmqe/providers/Microsoft.Network/virtualNetworks/example-azure-6qkpmqe" - region = "japaneast" - cidr = "10.42.0.0/16" - locations = "" - - bastion_ip = "bastion-example-azure-6qkpmqe.japaneast.cloudapp.azure.com" - user_name = "centos" - - public_key_path = "../../test_key.pub" - internal_domain = "internal.scalar-labs.com" - } -} diff --git a/test/modules/azuredeploy/kubernetes/main.tf b/test/modules/azuredeploy/kubernetes/main.tf deleted file mode 100644 index e09676f31..000000000 --- a/test/modules/azuredeploy/kubernetes/main.tf +++ /dev/null @@ -1,12 +0,0 @@ -module "kubernetes" { - source = "../../../../modules/azure/kubernetes" - - # Required variables (use network remote state) - network = local.network - - # Optional variables - kubernetes_cluster = var.kubernetes_cluster - kubernetes_default_node_pool = var.kubernetes_default_node_pool - kubernetes_scalar_apps_pool = var.kubernetes_scalar_apps_pool - custom_tags = var.custom_tags -} diff --git a/test/modules/azuredeploy/kubernetes/output.tf b/test/modules/azuredeploy/kubernetes/output.tf deleted file mode 100644 index d2e7c5639..000000000 --- a/test/modules/azuredeploy/kubernetes/output.tf +++ /dev/null @@ -1,9 +0,0 @@ -output "kube_config" { - value = module.kubernetes.kube_config - description = "kubectl configuration e.g: ~/.kube/config" -} - -output "k8s_ssh_config" { - value = module.kubernetes.k8s_ssh_config - description = "The configuration file for K8s API local port forward and SSH K8s Nodes access." -} diff --git a/test/modules/azuredeploy/kubernetes/remote.tf b/test/modules/azuredeploy/kubernetes/remote.tf deleted file mode 100644 index fe1a6d737..000000000 --- a/test/modules/azuredeploy/kubernetes/remote.tf +++ /dev/null @@ -1,7 +0,0 @@ -data "terraform_remote_state" "network" { - backend = "local" - - config = { - path = "../network/terraform.tfstate" - } -} diff --git a/test/modules/azuredeploy/kubernetes/terraform.tfvars b/test/modules/azuredeploy/kubernetes/terraform.tfvars deleted file mode 100644 index cf096c7a0..000000000 --- a/test/modules/azuredeploy/kubernetes/terraform.tfvars +++ /dev/null @@ -1,36 +0,0 @@ -# Optional -kubernetes_cluster = { - name = "scalar-kubernetes" - dns_prefix = "scalar-kubernetes" - kubernetes_version = "1.16.13" - admin_username = "azureuser" - role_based_access_control = true - kube_dashboard = true -} - -kubernetes_default_node_pool = { - name = "default" - node_count = "3" - vm_size = "Standard_D2s_v3" - max_pods = "100" - os_disk_size_gb = "64" - cluster_auto_scaling = "true" - cluster_auto_scaling_min_count = "3" - cluster_auto_scaling_max_count = "6" -} - -kubernetes_scalar_apps_pool = { - name = "scalardl" - node_count = "3" - vm_size = "Standard_D2s_v3" - max_pods = "100" - os_disk_size_gb = "64" - taints = "kubernetes.io/app=scalardl:NoSchedule" - cluster_auto_scaling = "true" - cluster_auto_scaling_min_count = "3" - cluster_auto_scaling_max_count = "6" -} - -custom_tags = { - "environment" = "example" -} diff --git a/test/modules/azuredeploy/kubernetes/vars.tf b/test/modules/azuredeploy/kubernetes/vars.tf deleted file mode 100644 index 2aea11a2a..000000000 --- a/test/modules/azuredeploy/kubernetes/vars.tf +++ /dev/null @@ -1,28 +0,0 @@ -variable "network" { - type = map - default = {} - description = "Custom definition for network and bastion" -} - -variable "kubernetes_cluster" { - type = map - default = {} - description = "Custom definition kubernetes properties that include name of the cluster, kubernetes version, etc.." -} - -variable "kubernetes_default_node_pool" { - type = map - default = {} - description = "Custom definition kubernetes default node pool that include number of node, node size, autoscaling, etc.." -} - -variable "kubernetes_scalar_apps_pool" { - type = map - default = {} - description = "Custom definition kubernetes scalar apps pool, same as default_node_pool" -} - -variable "custom_tags" { - type = map - default = {} -} diff --git a/test/modules/azuredeploy/monitor/azure.tf b/test/modules/azuredeploy/monitor/azure.tf deleted file mode 100644 index 8ec729873..000000000 --- a/test/modules/azuredeploy/monitor/azure.tf +++ /dev/null @@ -1,3 +0,0 @@ -provider "azurerm" { - version = "=1.38.0" -} diff --git a/test/modules/azuredeploy/monitor/locals.tf b/test/modules/azuredeploy/monitor/locals.tf deleted file mode 100644 index 78965f7e6..000000000 --- a/test/modules/azuredeploy/monitor/locals.tf +++ /dev/null @@ -1,31 +0,0 @@ -locals { - network = { - cidr = data.terraform_remote_state.network.outputs.network_cidr - name = data.terraform_remote_state.network.outputs.network_name - dns = data.terraform_remote_state.network.outputs.dns_zone_id - id = data.terraform_remote_state.network.outputs.network_id - region = data.terraform_remote_state.network.outputs.region - locations = join(",", data.terraform_remote_state.network.outputs.locations) - - subnet_id = data.terraform_remote_state.network.outputs.subnet_map["private"] - image_id = data.terraform_remote_state.network.outputs.image_id - - bastion_ip = data.terraform_remote_state.network.outputs.bastion_ip - bastion_provision_id = data.terraform_remote_state.network.outputs.bastion_provision_id - - public_key_path = data.terraform_remote_state.network.outputs.public_key_path - private_key_path = data.terraform_remote_state.network.outputs.private_key_path - user_name = data.terraform_remote_state.network.outputs.user_name - internal_domain = data.terraform_remote_state.network.outputs.internal_domain - } - - cassandra = { - resource_count = data.terraform_remote_state.cassandra.outputs.cassandra_resource_count - } - - scalardl = { - blue_resource_count = data.terraform_remote_state.scalardl.outputs.scalardl_blue_resource_count - green_resource_count = data.terraform_remote_state.scalardl.outputs.scalardl_green_resource_count - replication_factor = data.terraform_remote_state.scalardl.outputs.scalardl_replication_factor - } -} diff --git a/test/modules/azuredeploy/monitor/locals.tf.dummy b/test/modules/azuredeploy/monitor/locals.tf.dummy deleted file mode 100644 index 34b78c513..000000000 --- a/test/modules/azuredeploy/monitor/locals.tf.dummy +++ /dev/null @@ -1,31 +0,0 @@ -locals { - network = { - cidr = "10.42.0.0/16" - name = "example-azure" - dns = "internal.scalar-labs.com" - id = "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/example-azure-6qkpmqe/providers/Microsoft.Network/virtualNetworks/example-azure-6qkpmqe" - region = "japaneast" - locations = "" - - subnet_id = "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/example-azure-6qkpmqe/providers/Microsoft.Network/virtualNetworks/example-azure-6qkpmqe/subnets/cassandra" - image_id = "CentOS" - - bastion_ip = "111.112.113.114" - bastion_provision_id = "1234567890123456789" - - public_key_path = "../../test_key.pub" - private_key_path = "../../test_key" - user_name = "centos" - internal_domain = "internal.scalar-labs.com" - } - - cassandra = { - resource_count = 3 - } - - scalardl = { - blue_resource_count = 3 - green_resource_count = 0 - replication_factor = 3 - } -} diff --git a/test/modules/azuredeploy/monitor/main.tf b/test/modules/azuredeploy/monitor/main.tf deleted file mode 100644 index 79a47feb5..000000000 --- a/test/modules/azuredeploy/monitor/main.tf +++ /dev/null @@ -1,12 +0,0 @@ -module "monitor" { - source = "../../../../modules/azure/monitor" - - # Required Variables (Use remote state) - network = local.network - cassandra = local.cassandra - scalardl = local.scalardl - - # Optional Variables - base = var.base - monitor = var.monitor -} diff --git a/test/modules/azuredeploy/monitor/remote.tf b/test/modules/azuredeploy/monitor/remote.tf deleted file mode 100644 index 3defb6dca..000000000 --- a/test/modules/azuredeploy/monitor/remote.tf +++ /dev/null @@ -1,23 +0,0 @@ -data "terraform_remote_state" "network" { - backend = "local" - - config = { - path = "../network/terraform.tfstate" - } -} - -data "terraform_remote_state" "cassandra" { - backend = "local" - - config = { - path = "../cassandra/terraform.tfstate" - } -} - -data "terraform_remote_state" "scalardl" { - backend = "local" - - config = { - path = "../scalardl/terraform.tfstate" - } -} diff --git a/test/modules/azuredeploy/monitor/vars.tf b/test/modules/azuredeploy/monitor/vars.tf deleted file mode 100644 index 77e0a1830..000000000 --- a/test/modules/azuredeploy/monitor/vars.tf +++ /dev/null @@ -1,9 +0,0 @@ -# General Settings -variable "base" { - default = "default" -} - -variable "monitor" { - type = map - default = {} -} diff --git a/test/modules/azuredeploy/monitor/versions.tf b/test/modules/azuredeploy/monitor/versions.tf deleted file mode 100644 index d9b6f790b..000000000 --- a/test/modules/azuredeploy/monitor/versions.tf +++ /dev/null @@ -1,3 +0,0 @@ -terraform { - required_version = ">= 0.12" -} diff --git a/test/modules/azuredeploy/network/additional_public_keys b/test/modules/azuredeploy/network/additional_public_keys deleted file mode 100644 index cf52d65d9..000000000 --- a/test/modules/azuredeploy/network/additional_public_keys +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDntN1I8GDY4VGvZM1A6nIVWR3ZjEMTXOhhD7BbnhVjGM4Qnffz+XNiOG2z/tTnkLO6q2uckxTUr3EokVenXCiSGXAgDl0L4134vyiLpUtWS+RwqfSfJHNuCBGoaC1Srt8bUZ/ltemz/xChjPrC3E0pIJssV9fGZtOnJ+eRxEIyc8BxY3zsTGqEnl7s2ybTkFDj0kUJsSn0SaJUNTet9nQOFWr93UsvnRrcNDos3WdTw+WBU9FA+54picqZLQz9JXgHoj8ehEaN7yjGeHpUBCX7uLUFXKLdw6K0ZrOuPu648bRyPV1A3JJF/z1kYwZwgMF3bPlYl/qd+tNolpvwgDn5 test-key \ No newline at end of file diff --git a/test/modules/azuredeploy/network/azure.tf b/test/modules/azuredeploy/network/azure.tf deleted file mode 100644 index 8ec729873..000000000 --- a/test/modules/azuredeploy/network/azure.tf +++ /dev/null @@ -1,3 +0,0 @@ -provider "azurerm" { - version = "=1.38.0" -} diff --git a/test/modules/azuredeploy/network/main.tf b/test/modules/azuredeploy/network/main.tf deleted file mode 100644 index e916fa533..000000000 --- a/test/modules/azuredeploy/network/main.tf +++ /dev/null @@ -1,15 +0,0 @@ -module "network" { - source = "../../../../modules/azure/network" - - # Required Variables - name = var.name - region = var.region - locations = var.locations - public_key_path = var.public_key_path - private_key_path = var.private_key_path - additional_public_keys_path = var.additional_public_keys_path - internal_domain = var.internal_domain - - # Optional Variables - network = var.network -} diff --git a/test/modules/azuredeploy/network/output.tf b/test/modules/azuredeploy/network/output.tf deleted file mode 100644 index 6ab49a01f..000000000 --- a/test/modules/azuredeploy/network/output.tf +++ /dev/null @@ -1,59 +0,0 @@ -output "bastion_ip" { - value = module.network.bastion_ip -} - -output "network_cidr" { - value = module.network.network_cidr -} - -output "network_name" { - value = module.network.network_name -} - -output "dns_zone_id" { - value = module.network.dns_zone_id -} - -output "network_id" { - value = module.network.network_id -} - -output "subnet_map" { - value = module.network.subnet_map -} - -output "image_id" { - value = module.network.image_id -} - -output "bastion_provision_id" { - value = module.network.bastion_provision_id -} - -output "public_key_path" { - value = module.network.public_key_path -} - -output "region" { - value = module.network.region -} - -output "locations" { - value = module.network.locations -} - -output "user_name" { - value = module.network.user_name -} - -output "private_key_path" { - value = module.network.private_key_path -} - -output "ssh_config" { - value = module.network.ssh_config -} - -output "internal_domain" { - value = module.network.internal_domain -} diff --git a/test/modules/azuredeploy/network/vars.tf b/test/modules/azuredeploy/network/vars.tf deleted file mode 100644 index d9e32262a..000000000 --- a/test/modules/azuredeploy/network/vars.tf +++ /dev/null @@ -1,34 +0,0 @@ -# General Settings -variable "name" { - default = "Terratest" -} - -variable "region" { - default = "West US" -} - -variable "locations" { - type = list(string) - default = [] -} - -variable "public_key_path" { - default = "../../test_key.pub" -} - -variable "private_key_path" { - default = "../../test_key" -} - -variable "additional_public_keys_path" { - default = "./additional_public_keys" -} - -variable "internal_domain" { - default = "internal.scalar-labs.com" -} - -variable "network" { - type = map - default = {} -} diff --git a/test/modules/azuredeploy/network/versions.tf b/test/modules/azuredeploy/network/versions.tf deleted file mode 100644 index d9b6f790b..000000000 --- a/test/modules/azuredeploy/network/versions.tf +++ /dev/null @@ -1,3 +0,0 @@ -terraform { - required_version = ">= 0.12" -} diff --git a/test/modules/azuredeploy/scalardl/azure.tf b/test/modules/azuredeploy/scalardl/azure.tf deleted file mode 100644 index 8ec729873..000000000 --- a/test/modules/azuredeploy/scalardl/azure.tf +++ /dev/null @@ -1,3 +0,0 @@ -provider "azurerm" { - version = "=1.38.0" -} diff --git a/test/modules/azuredeploy/scalardl/locals.tf b/test/modules/azuredeploy/scalardl/locals.tf deleted file mode 100644 index cabf5894c..000000000 --- a/test/modules/azuredeploy/scalardl/locals.tf +++ /dev/null @@ -1,30 +0,0 @@ -locals { - network = { - cidr = data.terraform_remote_state.network.outputs.network_cidr - name = data.terraform_remote_state.network.outputs.network_name - dns = data.terraform_remote_state.network.outputs.dns_zone_id - id = data.terraform_remote_state.network.outputs.network_id - region = data.terraform_remote_state.network.outputs.region - locations = join(",", data.terraform_remote_state.network.outputs.locations) - - image_id = data.terraform_remote_state.network.outputs.image_id - - bastion_ip = data.terraform_remote_state.network.outputs.bastion_ip - bastion_provision_id = data.terraform_remote_state.network.outputs.bastion_provision_id - - public_key_path = data.terraform_remote_state.network.outputs.public_key_path - private_key_path = data.terraform_remote_state.network.outputs.private_key_path - user_name = data.terraform_remote_state.network.outputs.user_name - internal_domain = data.terraform_remote_state.network.outputs.internal_domain - - public_subnet_id = data.terraform_remote_state.network.outputs.subnet_map["public"] - private_subnet_id = data.terraform_remote_state.network.outputs.subnet_map["private"] - blue_subnet_id = data.terraform_remote_state.network.outputs.subnet_map["scalardl_blue"] - green_subnet_id = data.terraform_remote_state.network.outputs.subnet_map["scalardl_green"] - } - - cassandra = { - start_on_initial_boot = data.terraform_remote_state.cassandra.outputs.cassandra_start_on_initial_boot - provision_ids = join(",", data.terraform_remote_state.cassandra.outputs.cassandra_provision_ids) - } -} diff --git a/test/modules/azuredeploy/scalardl/locals.tf.dummy b/test/modules/azuredeploy/scalardl/locals.tf.dummy deleted file mode 100644 index 2fa9730c5..000000000 --- a/test/modules/azuredeploy/scalardl/locals.tf.dummy +++ /dev/null @@ -1,31 +0,0 @@ -locals { - network = { - cidr = "10.42.0.0/16" - name = "example-azure" - dns = "internal.scalar-labs.com" - id = "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/example-azure-6qkpmqe/providers/Microsoft.Network/virtualNetworks/example-azure-6qkpmqe" - region = "japaneast" - locations = "" - - subnet_id = "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/example-azure-6qkpmqe/providers/Microsoft.Network/virtualNetworks/example-azure-6qkpmqe/subnets/cassandra" - image_id = "CentOS" - - bastion_ip = "111.112.113.114" - bastion_provision_id = "1234567890123456789" - - public_key_path = "../../test_key.pub" - private_key_path = "../../test_key" - user_name = "centos" - internal_domain = "internal.scalar-labs.com" - - public_subnet_id = "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/example-azure-6qkpmqe/providers/Microsoft.Network/virtualNetworks/example-azure-6qkpmqe/subnets/public" - private_subnet_id = "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/example-azure-6qkpmqe/providers/Microsoft.Network/virtualNetworks/example-azure-6qkpmqe/subnets/private" - blue_subnet_id = "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/example-azure-6qkpmqe/providers/Microsoft.Network/virtualNetworks/example-azure-6qkpmqe/subnets/blue_subnet_id" - green_subnet_id = "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/example-azure-6qkpmqe/providers/Microsoft.Network/virtualNetworks/example-azure-6qkpmqe/subnets/public" - } - - cassandra = { - start_on_initial_boot = false - provision_ids = "1234567890123456789" - } -} diff --git a/test/modules/azuredeploy/scalardl/main.tf b/test/modules/azuredeploy/scalardl/main.tf deleted file mode 100644 index c7e440f78..000000000 --- a/test/modules/azuredeploy/scalardl/main.tf +++ /dev/null @@ -1,12 +0,0 @@ -module "scalardl" { - source = "../../../../modules/azure/scalardl" - - # Required Variables (Use remote state) - network = local.network - cassandra = local.cassandra - - # Optional Variables - base = var.base - scalardl = var.scalardl - envoy = var.envoy -} diff --git a/test/modules/azuredeploy/scalardl/output.tf b/test/modules/azuredeploy/scalardl/output.tf deleted file mode 100644 index 7d5392069..000000000 --- a/test/modules/azuredeploy/scalardl/output.tf +++ /dev/null @@ -1,27 +0,0 @@ -output "scalardl_blue_resource_count" { - value = module.scalardl.scalardl_blue_resource_count -} - -output "scalardl_green_resource_count" { - value = module.scalardl.scalardl_green_resource_count -} - -output "scalardl_replication_factor" { - value = module.scalardl.scalardl_replication_factor -} - -output "scalar_dns" { - value = module.scalardl.envoy_dns[0] -} - -output "monitor_url" { - value = "http://${module.scalardl.envoy_dns[0]}:${module.scalardl.envoy_listen_port}" -} - -output "scalardl_blue_test_ip_0" { - value = module.scalardl.blue_scalardl_ips[0] -} - -output "scalardl_blue_test_ip_1" { - value = module.scalardl.blue_scalardl_ips[1] -} diff --git a/test/modules/azuredeploy/scalardl/remote.tf b/test/modules/azuredeploy/scalardl/remote.tf deleted file mode 100644 index 8db871f06..000000000 --- a/test/modules/azuredeploy/scalardl/remote.tf +++ /dev/null @@ -1,15 +0,0 @@ -data "terraform_remote_state" "network" { - backend = "local" - - config = { - path = "../network/terraform.tfstate" - } -} - -data "terraform_remote_state" "cassandra" { - backend = "local" - - config = { - path = "../cassandra/terraform.tfstate" - } -} diff --git a/test/modules/azuredeploy/scalardl/terraform.tfvars b/test/modules/azuredeploy/scalardl/terraform.tfvars deleted file mode 100644 index 776039655..000000000 --- a/test/modules/azuredeploy/scalardl/terraform.tfvars +++ /dev/null @@ -1,3 +0,0 @@ -envoy = { - nlb_internal = "false" -} diff --git a/test/modules/azuredeploy/scalardl/vars.tf b/test/modules/azuredeploy/scalardl/vars.tf deleted file mode 100644 index 506bbb19b..000000000 --- a/test/modules/azuredeploy/scalardl/vars.tf +++ /dev/null @@ -1,14 +0,0 @@ -# General Settings -variable "base" { - default = "default" -} - -variable "scalardl" { - type = map - default = {} -} - -variable "envoy" { - type = map - default = {} -} diff --git a/test/modules/azuredeploy/scalardl/versions.tf b/test/modules/azuredeploy/scalardl/versions.tf deleted file mode 100644 index d9b6f790b..000000000 --- a/test/modules/azuredeploy/scalardl/versions.tf +++ /dev/null @@ -1,3 +0,0 @@ -terraform { - required_version = ">= 0.12" -} diff --git a/test/modules/test_key b/test/modules/test_key deleted file mode 100644 index e69de29bb..000000000 diff --git a/test/modules/test_key.pub b/test/modules/test_key.pub deleted file mode 100644 index 7b623cb53..000000000 --- a/test/modules/test_key.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyvESRzWdz4/Q/4CHO9pJfH8SKOBnz9o99bnc8vpLnDqTFQN1MozkXM2iZcI6PlLIrrUMVRNjby5KF0R7imexitzchnTfqWe5H1/sqjgJlKrL6/Ack2OMeOetrsQzcQ84j1Je2esAZlH5n1RmRdXEWzt14M7CD9gDvX8j5NlMeplN7uHbY4e/SbTnWmtvug65RZf71lr31DBuJjWUf70kxyYoUO5J9Dcq/OFpjETlHJE54MpWFbSOYkJB1HWcBeuFT7N12VEV2J+EFECJ+zItG5yO9/wl1txg6zY9qvyw7qA7DVH4jZHfGBLs+DsBVAz7RDDCvXWt8NTkTPQYKaG4b test@test.local diff --git a/test/src/integration/.gitignore b/test/src/integration/.gitignore deleted file mode 100644 index cf5436391..000000000 --- a/test/src/integration/.gitignore +++ /dev/null @@ -1 +0,0 @@ -scalardl-client-sdk diff --git a/test/src/integration/Gopkg.lock b/test/src/integration/Gopkg.lock deleted file mode 100644 index 9e32c8e0a..000000000 --- a/test/src/integration/Gopkg.lock +++ /dev/null @@ -1,667 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - digest = "1:80004fcc5cf64e591486b3e11b406f1e0d17bf85d475d64203c8494f5da4fcd1" - name = "cloud.google.com/go" - packages = ["compute/metadata"] - pruneopts = "UT" - revision = "775730d6e48254a2430366162cf6298e5368833c" - version = "v0.39.0" - -[[projects]] - digest = "1:8374c9200e4a27802177a3a88dd90c5587d81dafa7082b50242d103ae60d0a99" - name = "github.com/aws/aws-sdk-go" - packages = [ - "aws", - "aws/awserr", - "aws/awsutil", - "aws/client", - "aws/client/metadata", - "aws/corehandlers", - "aws/credentials", - "aws/credentials/ec2rolecreds", - "aws/credentials/endpointcreds", - "aws/credentials/processcreds", - "aws/credentials/stscreds", - "aws/crr", - "aws/csm", - "aws/defaults", - "aws/ec2metadata", - "aws/endpoints", - "aws/request", - "aws/session", - "aws/signer/v4", - "internal/ini", - "internal/s3err", - "internal/sdkio", - "internal/sdkrand", - "internal/sdkuri", - "internal/shareddefaults", - "private/protocol", - "private/protocol/ec2query", - "private/protocol/eventstream", - "private/protocol/eventstream/eventstreamapi", - "private/protocol/json/jsonutil", - "private/protocol/jsonrpc", - "private/protocol/query", - "private/protocol/query/queryutil", - "private/protocol/rest", - "private/protocol/restxml", - "private/protocol/xml/xmlutil", - "service/acm", - "service/autoscaling", - "service/cloudwatchlogs", - "service/dynamodb", - "service/ec2", - "service/ecs", - "service/iam", - "service/kms", - "service/rds", - "service/s3", - "service/s3/s3iface", - "service/s3/s3manager", - "service/sns", - "service/sqs", - "service/ssm", - "service/sts", - ] - pruneopts = "UT" - revision = "8943f83bb1e98c94710f767576fe17cc29adb4dd" - version = "v1.19.38" - -[[projects]] - digest = "1:7b94d37d65c0445053c6f3e73090e3966c1c29127035492c349e14f25c440359" - name = "github.com/boombuler/barcode" - packages = [ - ".", - "qr", - "utils", - ] - pruneopts = "UT" - revision = "3cfea5ab600ae37946be2b763b8ec2c1cf2d272d" - version = "v1.0.0" - -[[projects]] - digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec" - name = "github.com/davecgh/go-spew" - packages = ["spew"] - pruneopts = "UT" - revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73" - version = "v1.1.1" - -[[projects]] - branch = "master" - digest = "1:ecdc8e0fe3bc7d549af1c9c36acf3820523b707d6c071b6d0c3860882c6f7b42" - name = "github.com/docker/spdystream" - packages = [ - ".", - "spdy", - ] - pruneopts = "UT" - revision = "6480d4af844c189cf5dd913db24ddd339d3a4f85" - -[[projects]] - digest = "1:2cd7915ab26ede7d95b8749e6b1f933f1c6d5398030684e6505940a10f31cfda" - name = "github.com/ghodss/yaml" - packages = ["."] - pruneopts = "UT" - revision = "0ca9ea5df5451ffdf184b4428c902747c2c11cd7" - version = "v1.0.0" - -[[projects]] - branch = "master" - digest = "1:d0557c61d3acd22f04f7b6b675b847381034b229b7dce10b1d31bfa0d7f30017" - name = "github.com/go-errors/errors" - packages = ["."] - pruneopts = "UT" - revision = "d98b870cc4e05f1545532a80e9909be8216095b6" - -[[projects]] - digest = "1:ec6f9bf5e274c833c911923c9193867f3f18788c461f76f05f62bb1510e0ae65" - name = "github.com/go-sql-driver/mysql" - packages = ["."] - pruneopts = "UT" - revision = "72cd26f257d44c1114970e19afddcd812016007e" - version = "v1.4.1" - -[[projects]] - digest = "1:4d02824a56d268f74a6b6fdd944b20b58a77c3d70e81008b3ee0c4f1a6777340" - name = "github.com/gogo/protobuf" - packages = [ - "proto", - "sortkeys", - ] - pruneopts = "UT" - revision = "ba06b47c162d49f2af050fb4c75bcbc86a159d5c" - version = "v1.2.1" - -[[projects]] - branch = "master" - digest = "1:1ba1d79f2810270045c328ae5d674321db34e3aae468eb4233883b473c5c0467" - name = "github.com/golang/glog" - packages = ["."] - pruneopts = "UT" - revision = "23def4e6c14b4da8ac2ed8007337bc5eb5007998" - -[[projects]] - digest = "1:239c4c7fd2159585454003d9be7207167970194216193a8a210b8d29576f19c9" - name = "github.com/golang/protobuf" - packages = [ - "proto", - "ptypes", - "ptypes/any", - "ptypes/duration", - "ptypes/timestamp", - ] - pruneopts = "UT" - revision = "b5d812f8a3706043e23a9cd5babf2e5423744d30" - version = "v1.3.1" - -[[projects]] - digest = "1:0bfbe13936953a98ae3cfe8ed6670d396ad81edf069a806d2f6515d7bb6950df" - name = "github.com/google/btree" - packages = ["."] - pruneopts = "UT" - revision = "4030bb1f1f0c35b30ca7009e9ebd06849dd45306" - version = "v1.0.0" - -[[projects]] - digest = "1:a6181aca1fd5e27103f9a920876f29ac72854df7345a39f3b01e61c8c94cc8af" - name = "github.com/google/gofuzz" - packages = ["."] - pruneopts = "UT" - revision = "f140a6486e521aad38f5917de355cbf147cc0496" - version = "v1.0.0" - -[[projects]] - digest = "1:8f8811f9be822914c3a25c6a071e93beb4c805d7b026cbf298bc577bc1cc945b" - name = "github.com/google/uuid" - packages = ["."] - pruneopts = "UT" - revision = "064e2069ce9c359c118179501254f67d7d37ba24" - version = "0.2" - -[[projects]] - digest = "1:65c4414eeb350c47b8de71110150d0ea8a281835b1f386eacaa3ad7325929c21" - name = "github.com/googleapis/gnostic" - packages = [ - "OpenAPIv2", - "compiler", - "extensions", - ] - pruneopts = "UT" - revision = "7c663266750e7d82587642f65e60bc4083f1f84e" - version = "v0.2.0" - -[[projects]] - branch = "master" - digest = "1:b4395b2a4566c24459af3d04009b39cc21762fc77ec7bf7a1aa905c91e8f018d" - name = "github.com/gregjones/httpcache" - packages = [ - ".", - "diskcache", - ] - pruneopts = "UT" - revision = "3befbb6ad0cc97d4c25d851e9528915809e1a22f" - -[[projects]] - digest = "1:b17934d012a71aa0367870f2a0d0a7b117cb823768295b0e9e1b6e39fab6ebbd" - name = "github.com/gruntwork-io/gruntwork-cli" - packages = ["errors"] - pruneopts = "UT" - revision = "6a2163138f3d10377f313428e7e367b0a6c0c1c9" - version = "v0.4.2" - -[[projects]] - digest = "1:3b3a285e6aa7ce2dd9c4cd8417c42ca40035fd1e2f823f54261ad99101589be6" - name = "github.com/gruntwork-io/terratest" - packages = [ - "modules/aws", - "modules/collections", - "modules/customerrors", - "modules/environment", - "modules/files", - "modules/k8s", - "modules/logger", - "modules/packer", - "modules/random", - "modules/retry", - "modules/shell", - "modules/ssh", - "modules/terraform", - "modules/test-structure", - ] - pruneopts = "UT" - revision = "ef405f088c69e1dc5913c8026daa10efc33d9283" - version = "v0.15.13" - -[[projects]] - digest = "1:a0cefd27d12712af4b5018dc7046f245e1e3b5760e2e848c30b171b570708f9b" - name = "github.com/imdario/mergo" - packages = ["."] - pruneopts = "UT" - revision = "7c29201646fa3de8506f701213473dd407f19646" - version = "v0.3.7" - -[[projects]] - digest = "1:870d441fe217b8e689d7949fef6e43efbc787e50f200cb1e70dbca9204a1d6be" - name = "github.com/inconshreveable/mousetrap" - packages = ["."] - pruneopts = "UT" - revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" - version = "v1.0" - -[[projects]] - digest = "1:bb81097a5b62634f3e9fec1014657855610c82d19b9a40c17612e32651e35dca" - name = "github.com/jmespath/go-jmespath" - packages = ["."] - pruneopts = "UT" - revision = "c2b33e84" - -[[projects]] - digest = "1:f5a2051c55d05548d2d4fd23d244027b59fbd943217df8aa3b5e170ac2fd6e1b" - name = "github.com/json-iterator/go" - packages = ["."] - pruneopts = "UT" - revision = "0ff49de124c6f76f8494e194af75bde0f1a49a29" - version = "v1.1.6" - -[[projects]] - digest = "1:5d231480e1c64a726869bc4142d270184c419749d34f167646baa21008eb0a79" - name = "github.com/mitchellh/go-homedir" - packages = ["."] - pruneopts = "UT" - revision = "af06845cf3004701891bf4fdb884bfe4920b3727" - version = "v1.1.0" - -[[projects]] - digest = "1:33422d238f147d247752996a26574ac48dcf472976eda7f5134015f06bf16563" - name = "github.com/modern-go/concurrent" - packages = ["."] - pruneopts = "UT" - revision = "bacd9c7ef1dd9b15be4a9909b8ac7a4e313eec94" - version = "1.0.3" - -[[projects]] - digest = "1:e32bdbdb7c377a07a9a46378290059822efdce5c8d96fe71940d87cb4f918855" - name = "github.com/modern-go/reflect2" - packages = ["."] - pruneopts = "UT" - revision = "4b7aa43c6742a2c18fdef89dd197aaae7dac7ccd" - version = "1.0.1" - -[[projects]] - branch = "master" - digest = "1:89da0f0574bc94cfd0ac8b59af67bf76cdd110d503df2721006b9f0492394333" - name = "github.com/petar/GoLLRB" - packages = ["llrb"] - pruneopts = "UT" - revision = "33fb24c13b99c46c93183c291836c573ac382536" - -[[projects]] - digest = "1:a8c2725121694dfbf6d552fb86fe6b46e3e7135ea05db580c28695b916162aad" - name = "github.com/peterbourgon/diskv" - packages = ["."] - pruneopts = "UT" - revision = "0be1b92a6df0e4f5cb0a5d15fb7f643d0ad93ce6" - version = "v3.0.0" - -[[projects]] - digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe" - name = "github.com/pmezard/go-difflib" - packages = ["difflib"] - pruneopts = "UT" - revision = "792786c7400a136282c1664665ae0a8db921c6c2" - version = "v1.0.0" - -[[projects]] - digest = "1:dc56e7178a82f8e84960ed9efa7d4ebd0a6d7864894bfc46f8a35ee5eae7153a" - name = "github.com/pquerna/otp" - packages = [ - ".", - "hotp", - "totp", - ] - pruneopts = "UT" - revision = "be78767b3e392ce45ea73444451022a6fc32ad0d" - version = "v1.1.0" - -[[projects]] - digest = "1:22799aea8fe96dd5693abdd1eaa14b1b29e3eafbdc7733fa155b3cb556c8a7ae" - name = "github.com/spf13/cobra" - packages = ["."] - pruneopts = "UT" - revision = "67fc4837d267bc9bfd6e47f77783fcc3dffc68de" - version = "v0.0.4" - -[[projects]] - digest = "1:c1b1102241e7f645bc8e0c22ae352e8f0dc6484b6cb4d132fa9f24174e0119e2" - name = "github.com/spf13/pflag" - packages = ["."] - pruneopts = "UT" - revision = "298182f68c66c05229eb03ac171abe6e309ee79a" - version = "v1.0.3" - -[[projects]] - digest = "1:5da8ce674952566deae4dbc23d07c85caafc6cfa815b0b3e03e41979cedb8750" - name = "github.com/stretchr/testify" - packages = [ - "assert", - "require", - ] - pruneopts = "UT" - revision = "ffdc059bfe9ce6a4e144ba849dbedead332c6053" - version = "v1.3.0" - -[[projects]] - digest = "1:b24d38b282bacf9791408a080f606370efa3d364e4b5fd9ba0f7b87786d3b679" - name = "github.com/urfave/cli" - packages = ["."] - pruneopts = "UT" - revision = "cfb38830724cc34fedffe9a2a29fb54fa9169cd1" - version = "v1.20.0" - -[[projects]] - branch = "master" - digest = "1:2c6548bce7a4986c697700d747208f41122d6626216e11c38364d29a313aa220" - name = "golang.org/x/crypto" - packages = [ - "curve25519", - "ed25519", - "ed25519/internal/edwards25519", - "internal/chacha20", - "internal/subtle", - "poly1305", - "ssh", - "ssh/agent", - "ssh/terminal", - ] - pruneopts = "UT" - revision = "22d7a77e9e5f409e934ed268692e56707cd169e5" - -[[projects]] - branch = "master" - digest = "1:4c791e2b9890e96a29cc3c330652b0639ee18026e766c838667b0119099d31ea" - name = "golang.org/x/net" - packages = [ - "context", - "context/ctxhttp", - "http/httpguts", - "http2", - "http2/hpack", - "idna", - ] - pruneopts = "UT" - revision = "f3200d17e092c607f615320ecaad13d87ad9a2b3" - -[[projects]] - branch = "master" - digest = "1:7cba983d19f4aa6a154d73268dcc67a66bcc24bd7ee1c1b09d448a721dea0d9f" - name = "golang.org/x/oauth2" - packages = [ - ".", - "google", - "internal", - "jws", - "jwt", - ] - pruneopts = "UT" - revision = "aaccbc9213b0974828f81aaac109d194880e3014" - -[[projects]] - branch = "master" - digest = "1:832105dfef7fb8befe37f774c2ab4db8eec28b0e05501dee908d5daac0afbd20" - name = "golang.org/x/sys" - packages = [ - "cpu", - "unix", - "windows", - ] - pruneopts = "UT" - revision = "8097e1b27ff5e40620836729a9584e91b094b062" - -[[projects]] - digest = "1:8d8faad6b12a3a4c819a3f9618cb6ee1fa1cfc33253abeeea8b55336721e3405" - name = "golang.org/x/text" - packages = [ - "collate", - "collate/build", - "internal/colltab", - "internal/gen", - "internal/language", - "internal/language/compact", - "internal/tag", - "internal/triegen", - "internal/ucd", - "language", - "secure/bidirule", - "transform", - "unicode/bidi", - "unicode/cldr", - "unicode/norm", - "unicode/rangetable", - ] - pruneopts = "UT" - revision = "342b2e1fbaa52c93f31447ad2c6abc048c63e475" - version = "v0.3.2" - -[[projects]] - branch = "master" - digest = "1:9fdc2b55e8e0fafe4b41884091e51e77344f7dc511c5acedcfd98200003bff90" - name = "golang.org/x/time" - packages = ["rate"] - pruneopts = "UT" - revision = "9d24e82272b4f38b78bc8cff74fa936d31ccd8ef" - -[[projects]] - digest = "1:976bb93842df8598504293a578eb3693d17836cd8dfa8fe122517832f2d878c4" - name = "google.golang.org/appengine" - packages = [ - ".", - "cloudsql", - "internal", - "internal/app_identity", - "internal/base", - "internal/datastore", - "internal/log", - "internal/modules", - "internal/remote_api", - "internal/urlfetch", - "urlfetch", - ] - pruneopts = "UT" - revision = "4c25cacc810c02874000e4f7071286a8e96b2515" - version = "v1.6.0" - -[[projects]] - digest = "1:2d1fbdc6777e5408cabeb02bf336305e724b925ff4546ded0fa8715a7267922a" - name = "gopkg.in/inf.v0" - packages = ["."] - pruneopts = "UT" - revision = "d2d2541c53f18d2a059457998ce2876cc8e67cbf" - version = "v0.9.1" - -[[projects]] - digest = "1:4d2e5a73dc1500038e504a8d78b986630e3626dc027bc030ba5c75da257cdb96" - name = "gopkg.in/yaml.v2" - packages = ["."] - pruneopts = "UT" - revision = "51d6538a90f86fe93ac480b35f37b2be17fef232" - version = "v2.2.2" - -[[projects]] - branch = "release-1.12" - digest = "1:faf52d216e0d651ee48a5ee8fb43f818a6c36bf4246282a5e30b8985da5581ff" - name = "k8s.io/api" - packages = [ - "admissionregistration/v1alpha1", - "admissionregistration/v1beta1", - "apps/v1", - "apps/v1beta1", - "apps/v1beta2", - "authentication/v1", - "authentication/v1beta1", - "authorization/v1", - "authorization/v1beta1", - "autoscaling/v1", - "autoscaling/v2beta1", - "autoscaling/v2beta2", - "batch/v1", - "batch/v1beta1", - "batch/v2alpha1", - "certificates/v1beta1", - "coordination/v1beta1", - "core/v1", - "events/v1beta1", - "extensions/v1beta1", - "networking/v1", - "policy/v1beta1", - "rbac/v1", - "rbac/v1alpha1", - "rbac/v1beta1", - "scheduling/v1alpha1", - "scheduling/v1beta1", - "settings/v1alpha1", - "storage/v1", - "storage/v1alpha1", - "storage/v1beta1", - ] - pruneopts = "UT" - revision = "6db15a15d2d3874a6c3ddb2140ac9f3bc7058428" - -[[projects]] - branch = "release-1.12" - digest = "1:efacf240bb0225324e22fc0c20da3fc166b8d42778f667e1e32835556aa146df" - name = "k8s.io/apimachinery" - packages = [ - "pkg/api/errors", - "pkg/api/meta", - "pkg/api/resource", - "pkg/apis/meta/v1", - "pkg/apis/meta/v1/unstructured", - "pkg/apis/meta/v1beta1", - "pkg/conversion", - "pkg/conversion/queryparams", - "pkg/fields", - "pkg/labels", - "pkg/runtime", - "pkg/runtime/schema", - "pkg/runtime/serializer", - "pkg/runtime/serializer/json", - "pkg/runtime/serializer/protobuf", - "pkg/runtime/serializer/recognizer", - "pkg/runtime/serializer/streaming", - "pkg/runtime/serializer/versioning", - "pkg/selection", - "pkg/types", - "pkg/util/clock", - "pkg/util/errors", - "pkg/util/framer", - "pkg/util/httpstream", - "pkg/util/httpstream/spdy", - "pkg/util/intstr", - "pkg/util/json", - "pkg/util/naming", - "pkg/util/net", - "pkg/util/runtime", - "pkg/util/sets", - "pkg/util/validation", - "pkg/util/validation/field", - "pkg/util/yaml", - "pkg/version", - "pkg/watch", - "third_party/forked/golang/netutil", - "third_party/forked/golang/reflect", - ] - pruneopts = "UT" - revision = "01f179d85dbce0f2e0e4351a92394b38694b7cae" - -[[projects]] - branch = "release-9.0" - digest = "1:3c542387467a0f8a236086801293739245eb0937ef17ddb6a3d001b4dd4d6c81" - name = "k8s.io/client-go" - packages = [ - "discovery", - "kubernetes", - "kubernetes/scheme", - "kubernetes/typed/admissionregistration/v1alpha1", - "kubernetes/typed/admissionregistration/v1beta1", - "kubernetes/typed/apps/v1", - "kubernetes/typed/apps/v1beta1", - "kubernetes/typed/apps/v1beta2", - "kubernetes/typed/authentication/v1", - "kubernetes/typed/authentication/v1beta1", - "kubernetes/typed/authorization/v1", - "kubernetes/typed/authorization/v1beta1", - "kubernetes/typed/autoscaling/v1", - "kubernetes/typed/autoscaling/v2beta1", - "kubernetes/typed/autoscaling/v2beta2", - "kubernetes/typed/batch/v1", - "kubernetes/typed/batch/v1beta1", - "kubernetes/typed/batch/v2alpha1", - "kubernetes/typed/certificates/v1beta1", - "kubernetes/typed/coordination/v1beta1", - "kubernetes/typed/core/v1", - "kubernetes/typed/events/v1beta1", - "kubernetes/typed/extensions/v1beta1", - "kubernetes/typed/networking/v1", - "kubernetes/typed/policy/v1beta1", - "kubernetes/typed/rbac/v1", - "kubernetes/typed/rbac/v1alpha1", - "kubernetes/typed/rbac/v1beta1", - "kubernetes/typed/scheduling/v1alpha1", - "kubernetes/typed/scheduling/v1beta1", - "kubernetes/typed/settings/v1alpha1", - "kubernetes/typed/storage/v1", - "kubernetes/typed/storage/v1alpha1", - "kubernetes/typed/storage/v1beta1", - "pkg/apis/clientauthentication", - "pkg/apis/clientauthentication/v1alpha1", - "pkg/apis/clientauthentication/v1beta1", - "pkg/version", - "plugin/pkg/client/auth/exec", - "plugin/pkg/client/auth/gcp", - "rest", - "rest/watch", - "third_party/forked/golang/template", - "tools/auth", - "tools/clientcmd", - "tools/clientcmd/api", - "tools/clientcmd/api/latest", - "tools/clientcmd/api/v1", - "tools/metrics", - "tools/portforward", - "tools/reference", - "transport", - "transport/spdy", - "util/cert", - "util/connrotation", - "util/flowcontrol", - "util/homedir", - "util/integer", - "util/jsonpath", - ] - pruneopts = "UT" - revision = "b6aa6aafe32b0767f075245e5d391381c5449c8a" - -[[projects]] - digest = "1:7379e806daf6d6589f35f06200eecfe72abbb3c528e5a5900f92ed827c422e6b" - name = "k8s.io/kubernetes" - packages = ["pkg/kubectl/generate"] - pruneopts = "UT" - revision = "66049e3b21efe110454d67df4fa62b08ea79a19b" - version = "v1.14.2" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - input-imports = [ - "github.com/gruntwork-io/terratest/modules/logger", - "github.com/gruntwork-io/terratest/modules/ssh", - "github.com/gruntwork-io/terratest/modules/terraform", - "github.com/gruntwork-io/terratest/modules/test-structure", - "github.com/stretchr/testify/assert", - ] - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/test/src/integration/Gopkg.toml b/test/src/integration/Gopkg.toml deleted file mode 100644 index 445a0aade..000000000 --- a/test/src/integration/Gopkg.toml +++ /dev/null @@ -1,38 +0,0 @@ -# Gopkg.toml example -# -# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html -# for detailed Gopkg.toml documentation. -# -# required = ["github.com/user/thing/cmd/thing"] -# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] -# -# [[constraint]] -# name = "github.com/user/project" -# version = "1.0.0" -# -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# -# [[override]] -# name = "github.com/x/y" -# version = "2.4.0" -# -# [prune] -# non-go = false -# go-tests = true -# unused-packages = true - - -[[constraint]] - name = "github.com/gruntwork-io/terratest" - version = "0.15.13" - -[[constraint]] - name = "github.com/stretchr/testify" - version = "1.3.0" - -[prune] - go-tests = true - unused-packages = true diff --git a/test/src/integration/integration_alert_test.go b/test/src/integration/integration_alert_test.go deleted file mode 100644 index 8ef3fc9a7..000000000 --- a/test/src/integration/integration_alert_test.go +++ /dev/null @@ -1,214 +0,0 @@ -package test - -import ( - "testing" - - "modules/prometheus_helper" - - "github.com/gruntwork-io/terratest/modules/logger" - "github.com/gruntwork-io/terratest/modules/ssh" - "github.com/stretchr/testify/assert" -) - -func TestPrometheusAlerts(t *testing.T) { - t.Run("alerts", func(t *testing.T) { - t.Run("AlertmanagerContainerDown", TestAlertmanagerContainerDownWithPrometheusAPIExpectAlertIsNotFiring) - - t.Run("ScalarDLBlueCount", TestScalarDLBlueCountWithPrometheusAPIExpectCountIsValid) - t.Run("ScalarDLGreenCount", TestScalarDLGreenCountWithPrometheusAPIExpectCountIsValid) - t.Run("ScalarDegraded", TestScalarDegradedWithPrometheusAPIExpectAlertAndRecovery) - - t.Run("ReaperContainerDown", TestReaperContainerDownWithPrometheusAPIExpectAlertIsNotFiring) - - t.Run("CassandraCount", TestCassandraCountWithPrometheusAPIExpectCountIsValid) - t.Run("CassandraDegraded", TestCassandraDegradedWithPrometheusAPIExpectAlertAndRecovery) - t.Run("CassandraDriveSpaceLow", TestCassandraDriveSpaceLowWithPrometheusAPIExpectAlertIsFiring) - - t.Run("InstanceHighCPU", TestInstanceHighCPUWithPrometheusAPIExpectAlertIsFiring) - }) -} - -func TestAlertmanagerContainerDownWithPrometheusAPIExpectAlertIsNotFiring(t *testing.T) { - host := lookupTargetValue(t, "scalardl", "monitor_url") - alertname := "AlertmanagerContainerDown" - - verifyAlertNotFiring(t, host, alertname) -} - -func TestReaperContainerDownWithPrometheusAPIExpectAlertIsNotFiring(t *testing.T) { - host := lookupTargetValue(t, "scalardl", "monitor_url") - alertname := "ReaperContainerDown" - - verifyAlertNotFiring(t, host, alertname) -} - -func TestCassandraCountWithPrometheusAPIExpectCountIsValid(t *testing.T) { - host := lookupTargetValue(t, "scalardl", "monitor_url") - servicename := `count(node_systemd_unit_state{role="cassandra", name="cassandra.service", state="active"} == 1)` - expectedCount := "3" - - verifyServiceCount(t, host, servicename, expectedCount) -} - -func TestScalarDLBlueCountWithPrometheusAPIExpectCountIsValid(t *testing.T) { - host := lookupTargetValue(t, "scalardl", "monitor_url") - servicename := "job:active_scalardl_blue_nodes:count" - expectedCount := "3" - - verifyServiceCount(t, host, servicename, expectedCount) -} - -func TestScalarDLGreenCountWithPrometheusAPIExpectCountIsValid(t *testing.T) { - host := lookupTargetValue(t, "scalardl", "monitor_url") - servicename := "job:active_scalardl_green_nodes:count" - expectedCount := "0" - - verifyServiceCount(t, host, servicename, expectedCount) -} - -func TestScalarDegradedWithPrometheusAPIExpectAlertAndRecovery(t *testing.T) { - host := lookupTargetValue(t, "scalardl", "monitor_url") - alertname := "ScalarDLContainerDown" - - bastionIP := lookupTargetValue(t, "network", "bastion_ip") - scalardlIP := lookupTargetValue(t, "scalardl", "scalardl_blue_test_ip_0") - - publicHost := ssh.Host{ - Hostname: bastionIP, - SshAgent: true, - SshUserName: "centos", - } - privateHost := ssh.Host{ - Hostname: scalardlIP, - SshAgent: true, - SshUserName: "centos", - } - - commandStop := "docker stop $(docker ps -aq); sleep 120" - commandStart := "docker start $(docker ps -aq); sleep 90" - - output, _ := ssh.CheckPrivateSshConnectionE(t, publicHost, privateHost, commandStop) - logger.Logf(t, "Stopping Container: %s", output) - - verifyAlertFiring(t, host, alertname) - - output, _ = ssh.CheckPrivateSshConnectionE(t, publicHost, privateHost, commandStart) - logger.Logf(t, "Starting Container: %s", output) - - verifyAlertNotFiring(t, host, alertname) -} - -func TestCassandraDegradedWithPrometheusAPIExpectAlertAndRecovery(t *testing.T) { - t.Parallel() - - host := lookupTargetValue(t, "scalardl", "monitor_url") - alertname := "CassandraProcessStopped" - - bastionIP := lookupTargetValue(t, "network", "bastion_ip") - cassandraIP := lookupTargetValue(t, "cassandra", "cassandra_test_ip_0") - - publicHost := ssh.Host{ - Hostname: bastionIP, - SshAgent: true, - SshUserName: "centos", - } - privateHost := ssh.Host{ - Hostname: cassandraIP, - SshAgent: true, - SshUserName: "centos", - } - - commandStop := "sudo systemctl stop cassandra; sleep 120" - commandStart := "sudo systemctl start cassandra; sleep 120" - - output, _ := ssh.CheckPrivateSshConnectionE(t, publicHost, privateHost, commandStop) - logger.Logf(t, "Stopping Cassandra: %s", output) - - verifyAlertFiring(t, host, alertname) - - output, _ = ssh.CheckPrivateSshConnectionE(t, publicHost, privateHost, commandStart) - logger.Logf(t, "Starting Cassandra: %s", output) - - verifyAlertNotFiring(t, host, alertname) -} - -func TestInstanceHighCPUWithPrometheusAPIExpectAlertIsFiring(t *testing.T) { - t.Parallel() - - host := lookupTargetValue(t, "scalardl", "monitor_url") - alertname := "InstanceHighCPUUtilization" - - bastionIP := lookupTargetValue(t, "network", "bastion_ip") - cassandraIP := lookupTargetValue(t, "cassandra", "cassandra_test_ip_1") - - publicHost := ssh.Host{ - Hostname: bastionIP, - SshAgent: true, - SshUserName: "centos", - } - privateHost := ssh.Host{ - Hostname: cassandraIP, - SshAgent: true, - SshUserName: "centos", - } - - command := "sudo yum -y install stress && stress --cpu 8 --timeout 2m" - - output, _ := ssh.CheckPrivateSshConnectionE(t, publicHost, privateHost, command) - logger.Logf(t, "%s", output) - - verifyAlertFiring(t, host, alertname) -} - -func TestCassandraDriveSpaceLowWithPrometheusAPIExpectAlertIsFiring(t *testing.T) { - t.Parallel() - - host := lookupTargetValue(t, "scalardl", "monitor_url") - alertname := "CassandraDriveSpaceLow" - - bastionIP := lookupTargetValue(t, "network", "bastion_ip") - cassandraIP := lookupTargetValue(t, "cassandra", "cassandra_test_ip_1") - - publicHost := ssh.Host{ - Hostname: bastionIP, - SshAgent: true, - SshUserName: "centos", - } - privateHost := ssh.Host{ - Hostname: cassandraIP, - SshAgent: true, - SshUserName: "centos", - } - - commandWrite := "fallocate -l 60G largefile; sleep 60" - commandClear := "rm largefile; sleep 60" - - output, _ := ssh.CheckPrivateSshConnectionE(t, publicHost, privateHost, commandWrite) - logger.Logf(t, "%s", output) - - verifyAlertFiring(t, host, alertname) - - output, _ = ssh.CheckPrivateSshConnectionE(t, publicHost, privateHost, commandClear) - logger.Logf(t, "%s", output) - - verifyAlertNotFiring(t, host, alertname) -} - -func verifyAlertFiring(t *testing.T, host string, alertname string) { - _, count, _ := prometheus_helper.QueryAlert(t, host, alertname) - assert.True(t, (count >= 1)) -} - -func verifyAlertNotFiring(t *testing.T, host string, alertname string) { - _, count, _ := prometheus_helper.QueryAlert(t, host, alertname) - assert.Equal(t, 0, count) -} - -func verifyServiceCount(t *testing.T, host string, servicename string, expected string) { - _, count, response := prometheus_helper.QueryRule(t, host, servicename) - if count > 0 { - assert.Equal(t, expected, response.Data.Result[0].Value[1]) - } else { - assert.Equal(t, expected, "0") - } -} diff --git a/test/src/integration/integration_scalardl_test.go b/test/src/integration/integration_scalardl_test.go deleted file mode 100644 index 17d5bd016..000000000 --- a/test/src/integration/integration_scalardl_test.go +++ /dev/null @@ -1,85 +0,0 @@ -package test - -import ( - "fmt" - "io/ioutil" - "testing" - - "modules/grpc_helper" - - "github.com/gruntwork-io/terratest/modules/logger" - "github.com/stretchr/testify/assert" -) - -func TestScalarDL(t *testing.T) { - t.Run("scalardl", func(t *testing.T) { - t.Run("ScalarDLWithJavaClient", TestScalarDLWithJavaClientExpectStatusCodeIsValid) - t.Run("ScalarDLWithGrpcWebClient", TestScalarDLWithGrpcWebClientExpectStatusCodeIsValid) - }) -} - -func TestScalarDLWithJavaClientExpectStatusCodeIsValid(t *testing.T) { - expectedRegisterCertStatusCode := []string{"OK", "CERTIFICATE_ALREADY_REGISTERED"} - expectedRegisterContractStatusCode := []string{"OK", "CONTRACT_ALREADY_REGISTERED"} - expectedExecuteContractStatusCode := "OK" - expectedValidateLedgerStatusCode := "OK" - expectedListContractsStatusCode := "OK" - - contractID := "test-contract1" - contractBinaryName := "com.org1.contract.StateUpdater" - contractClassFile := "./resources/StateUpdater.class" - assetID := "over9000" - assetArgument := fmt.Sprintf(`{"asset_id": "%s", "state": 9001}`, assetID) - propertiesFile := "./resources/test.properties" - - scalarurl := lookupTargetValue(t, "scalardl", "scalar_dns") - logger.Logf(t, "URL: %s", scalarurl) - writePropertiesFile(t, scalarurl) - - code, _ := grpc_helper.GrpcJavaRegisterCert(t, propertiesFile) - assert.Contains(t, expectedRegisterCertStatusCode, code) - - code, _ = grpc_helper.GrpcJavaRegisterContract(t, propertiesFile, contractID, contractBinaryName, contractClassFile) - assert.Contains(t, expectedRegisterContractStatusCode, code) - - code, _ = grpc_helper.GrpcJavaExectueContract(t, propertiesFile, contractID, assetArgument) - assert.Equal(t, expectedExecuteContractStatusCode, code) - - code, _ = grpc_helper.GrpcJavaValidateAsset(t, propertiesFile, assetID) - assert.Equal(t, expectedValidateLedgerStatusCode, code) - - code, _ = grpc_helper.GrpcJavaListContracts(t, propertiesFile) - assert.Equal(t, expectedListContractsStatusCode, code) -} - -func TestScalarDLWithGrpcWebClientExpectStatusCodeIsValid(t *testing.T) { - expectedStatusCode := 200 - - scalarurl := lookupTargetValue(t, "scalardl", "scalar_dns") - logger.Logf(t, "URL: %s", scalarurl) - - //Register Certificate - requestData := "AAAAAFIKBW1kYm94EAEiRzBFAiEAx4josbxWPEuZ7w/imnl5B/xY0FKbQLkuK/E/UFUHbmwCIGBludc3JD3pkTYqmeT186g+rDaoFkLqHg4xCQ8uCL3w" - listContractURL := fmt.Sprintf(`http://%s:50051/rpc.Ledger/ListContracts`, scalarurl) - - statuCode, _ := grpc_helper.GrpcWebTest(t, listContractURL, requestData) - - assert.Equal(t, expectedStatusCode, statuCode) -} - -func writePropertiesFile(t *testing.T, host string) { - properties := []byte(fmt.Sprintf(` - scalar.dl.client.server.host=%s - scalar.dl.client.server.port=50051 - scalar.dl.client.server.privileged_port=50052 - scalar.dl.client.cert_holder_id=test - scalar.dl.client.cert_version=1 - scalar.dl.client.cert_path=./resources/Test.pem - scalar.dl.client.private_key_path=./resources/Test-key.pem - `, host)) - - err := ioutil.WriteFile("./resources/test.properties", properties, 0644) - if err != nil { - t.Fatal(err) - } -} diff --git a/test/src/integration/integration_test.go b/test/src/integration/integration_test.go deleted file mode 100644 index 31dd3cdb6..000000000 --- a/test/src/integration/integration_test.go +++ /dev/null @@ -1,68 +0,0 @@ -package test - -import ( - "flag" - "testing" - "time" - - "github.com/gruntwork-io/terratest/modules/logger" - "github.com/gruntwork-io/terratest/modules/terraform" - test_structure "github.com/gruntwork-io/terratest/modules/test-structure" -) - -var terraformDir = flag.String("directory", "", "Directory path of the terraform module to test") - -func TestEndToEnd(t *testing.T) { - t.Parallel() - logger.Logf(t, "Start End To End Test") - - defer test_structure.RunTestStage(t, "teardown", func() { - scalarModules := []string{"monitor", "scalardl", "cassandra", "network"} - - for _, m := range scalarModules { - terraformOptions := &terraform.Options{ - TerraformDir: *terraformDir + m, - Vars: map[string]interface{}{}, - NoColor: true, - } - - logger.Logf(t, "Destroying <%s> Infrastructure", m) - terraform.DestroyE(t, terraformOptions) - } - - logger.Logf(t, "Finished End To End Test") - }) - - test_structure.RunTestStage(t, "setup", func() { - scalarModules := []string{"network", "cassandra", "scalardl", "monitor"} - - for _, m := range scalarModules { - terraformOptions := &terraform.Options{ - TerraformDir: *terraformDir + m, - Vars: map[string]interface{}{}, - NoColor: true, - } - - logger.Logf(t, "Creating <%s> Infrastructure", m) - terraform.InitAndApply(t, terraformOptions) - } - - logger.Logf(t, "Finished Creating Infrastructure: Tests will continue in 2 minutes") - time.Sleep(120 * time.Second) - }) - - test_structure.RunTestStage(t, "validate", func() { - t.Run("TestScalarDL", TestScalarDL) - // t.Run("TestPrometheusAlerts", TestPrometheusAlerts) - }) -} - -func lookupTargetValue(t *testing.T, module string, targetValue string) string { - terraformOptions := &terraform.Options{ - TerraformDir: *terraformDir + module, - Vars: map[string]interface{}{}, - NoColor: true, - } - - return terraform.OutputRequired(t, terraformOptions, targetValue) -} diff --git a/test/src/integration/resources/StateReader.class b/test/src/integration/resources/StateReader.class deleted file mode 100644 index ad47c971f6bd32b646ee23fe2fe3a38b4a47e7f2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2943 zcmb_e+jA3T6#so~(%mKt#n2W4Erg4ZmdlDDV2dazAc1m`)>bGAo8&XylJ3UMrWWsr z_dDKD^vQ8XU!1{l2B?m=7a#Q9Kfp))8)Q6ZH=CvRqEjz)0|4=6aUVkm+ThM9gaiV=)P@DNV$a#F!q1gG$D1drgfiZf9}VMLKZ zRz;2p$;6{7@=T1YF!?#b%(E)CFi}u3$xkbSe%LCCOgzSmqoSn3W#O`dDFu%UwCpl1 z)7>r5oa`A92o2adDbO}(TJlJFG9#T~BU2zwY|zdcg%QIsnXWKH?zmYJSUH%rCw1G& zZ_%^1z)rVZemB*!#lTJT*F|8^4ESZ@|da@<5WjK1SpciB=FX_#2jf_!}`k+Vm z4^9|U#gkHu9=1yQinOwnC`Z9G5&L{XKucSebOs8nL}y!8bG8(LyM5c*iYS}Nl+6N} z5Li(^(v-hXqMdVdf36the^ZTvARoKxTkGFVhIZDK=i<4gApE%fcv*D;6;$@@VWa4k zo`Q1Zo;$@?zl_@ zbpff)hz9e5AkgqWK47U2HEiL{)>4pD4U@Q} z;Uj!Z6KdQjjcX_}<1#LhSkaMFr+d-7m z`F%~jJ}VuxgFqKEZy9Bk?h@#zyIq0CFs;%dd5)x#e(QK+q%sV9PR`?3#tYB!*1U9m zl7g+(4P&6H=dO@-3f>fHHEhcQdX99iZnt@7h;duBeS}!9kuJBvrCq(;Nu0!inu46%LVZ3DqZ2~h`)Qs3|OvRX5OjJ8l z9RbzJ)Dota(q5dYWx?L^xWaUoz*Thn0xNvh%2`&Q$}$OoU(gj-W2<}tq63}LFVMyt zvDKc5(YQK;H3C;C+7K9_<7lTfM&EcH^jnIRh!cMq&C%u9if-IPoD{*H#%hdW4J0L? zL@78=;9n&8KPLpgA&u_|$yQ$AX+GH3dB~LjuM!xx}Lh**{Lc2o~$*f$yS@TY-~#3)%%_@7Cds>0{N=l+_9Q| z{eopTy}*}tU~L34Q1@F7rC(wg*L%`@Oq}gP=-eil^ev}hHI!3VT**MzWLsI)a9^r! z%O`Tz+HN;J>lVdYZClwvS8a6yw_&Zd0=MbOMyWW)mr=Xm0(1W@s6bNs_0Ep+0)Z1_ zVbd+Y*;0PsDw3ZH-G)*UFl4)}f{LRnr>R&C>D5^k-}UOON4%};BOoeVhpqy-gC&02 z>X&(OM2O`v*_8=?Wu(8pqeEp6LtEE$t|fhRg7;=Wz9U=V4I8*^pem5saO<87IzBW0 z?tj0)@l?j&YF@oly0>fSsy*lg!@wM|STr*Bge+j1QPcTC*Hn!x3eWl+1e3fswA z={2zas@>p5-ypEqYA7~no{0HAZeDs$KD^4j>*a$-D&OxPox!?^Pw=UU4cs$u-^3<9 zV>wNHjt6@41t(`@HUpPp;!8X<@RfxQZW($PvIr}Qcew0&=Qi)4I2-x~-0@TBT0=x&+v;Mu;< z0Nnl*C3vW!XLTehN9*iJ@(B+c-fnI z(430kQvBQu9n;h$W)eRm^BlAKYyOFeJse@*(@MYT_z#$+>o1th#-`(YI2y$sjtPov z6yirlk3naA21&|E63Ze_g7aK0(NbpKTg-eHr$RP2yBYV`Fn8)-4;en=xzl8(b!YGf zqQqFoS-i;zOIXDm-Xh;J|G5jaCQzhjZr^{N{$1NS+7`lGV!6~ylnpEj1Lse&*1Gy{ KGuVZ2_0Hd#)I!k! diff --git a/test/src/integration/resources/Test-key.pem b/test/src/integration/resources/Test-key.pem deleted file mode 100644 index 7b20178b9..000000000 --- a/test/src/integration/resources/Test-key.pem +++ /dev/null @@ -1,5 +0,0 @@ ------BEGIN EC PRIVATE KEY----- -MHcCAQEEIAsT5Djw3dCytAH2X+UEJnihuLWdG+eVepz4EQRhEWAtoAoGCCqGSM49 -AwEHoUQDQgAEBaWOchTN9JzVPj7yVeoXuIqn4fHt/eU1NvsolzfrDM8J3TRYYkuf -WEhXPAGwbYHwWGs4KqD6vE6Gp3gRI+z2Og== ------END EC PRIVATE KEY----- diff --git a/test/src/integration/resources/Test.pem b/test/src/integration/resources/Test.pem deleted file mode 100644 index cec87b0d3..000000000 --- a/test/src/integration/resources/Test.pem +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICfTCCAiOgAwIBAgIUONUIHpg4FFohV7Vn0LfDF41EN5cwCgYIKoZIzj0EAwIw -fzELMAkGA1UEBhMCSlAxDjAMBgNVBAgTBVRva3lvMQ4wDAYDVQQHEwVUb2t5bzEn -MCUGA1UEChMeU2NhbGFyIFNhbmRib3ggSW50ZXJtZWRpYXRlIENBMScwJQYDVQQD -Ex5TY2FsYXIgU2FuZGJveCBJbnRlcm1lZGlhdGUgQ0EwHhcNMTkwMTI0MDk1MzAw -WhcNMjIwMTIzMDk1MzAwWjAmMSQwIgYDVQQDExtTY2FsYXIgU2FuZGJveCBDbGll -bnQgTURCb3gwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQFpY5yFM30nNU+PvJV -6he4iqfh8e395TU2+yiXN+sMzwndNFhiS59YSFc8AbBtgfBYazgqoPq8ToaneBEj -7PY6o4HVMIHSMA4GA1UdDwEB/wQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDAjAM -BgNVHRMBAf8EAjAAMB0GA1UdDgQWBBSxEr6yG/81BZkjLIwx7Wcj7tqJfjAfBgNV -HSMEGDAWgBRs4LNwvnOSyNsV+xl+LC4CxZJ07jAxBggrBgEFBQcBAQQlMCMwIQYI -KwYBBQUHMAGGFWh0dHA6Ly9sb2NhbGhvc3Q6ODg4OTAqBgNVHR8EIzAhMB+gHaAb -hhlodHRwOi8vbG9jYWxob3N0Ojg4ODgvY3JsMAoGCCqGSM49BAMCA0gAMEUCIQCm -bf1NYphjfgjsBy8LQjDm4AxJlJyk3LK3XBZ/iQ6b/gIgYDya7FN81C2fKZDB29Rh -uyyuEzbmy1tieYA9IhH4lEk= ------END CERTIFICATE----- diff --git a/test/src/modules/Gopkg.lock b/test/src/modules/Gopkg.lock deleted file mode 100644 index 73eef90b7..000000000 --- a/test/src/modules/Gopkg.lock +++ /dev/null @@ -1,17 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - digest = "1:6fa8b886634cec12375d8a9187a01f297a19f7ea8e8eb8b1935d39f9f24e32cc" - name = "github.com/gruntwork-io/terratest" - packages = ["modules/logger"] - pruneopts = "UT" - revision = "ef405f088c69e1dc5913c8026daa10efc33d9283" - version = "v0.15.13" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - input-imports = ["github.com/gruntwork-io/terratest/modules/logger"] - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/test/src/modules/Gopkg.toml b/test/src/modules/Gopkg.toml deleted file mode 100644 index bd96676e3..000000000 --- a/test/src/modules/Gopkg.toml +++ /dev/null @@ -1,34 +0,0 @@ -# Gopkg.toml example -# -# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html -# for detailed Gopkg.toml documentation. -# -# required = ["github.com/user/thing/cmd/thing"] -# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] -# -# [[constraint]] -# name = "github.com/user/project" -# version = "1.0.0" -# -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# -# [[override]] -# name = "github.com/x/y" -# version = "2.4.0" -# -# [prune] -# non-go = false -# go-tests = true -# unused-packages = true - - -[[constraint]] - name = "github.com/gruntwork-io/terratest" - version = "0.15.13" - -[prune] - go-tests = true - unused-packages = true diff --git a/test/src/modules/grpc_helper/grpc_helper.go b/test/src/modules/grpc_helper/grpc_helper.go deleted file mode 100644 index de8b78dfd..000000000 --- a/test/src/modules/grpc_helper/grpc_helper.go +++ /dev/null @@ -1,137 +0,0 @@ -package grpc_helper - -import ( - "bytes" - "encoding/base64" - "encoding/json" - "fmt" - "io/ioutil" - "net/http" - "os/exec" - "testing" - - "github.com/gruntwork-io/terratest/modules/logger" -) - -func GrpcJavaListContracts(t *testing.T, propertiesFile string) (string, string) { - action := "list-contracts" - - options := []string{ - "--properties", propertiesFile, - } - - return GrpcJavaTest(t, action, options...) -} - -func GrpcJavaValidateAsset(t *testing.T, propertiesFile string, assetId string) (string, string) { - action := "validate-ledger" - - options := []string{ - "--properties", propertiesFile, - "--asset-id", assetId, - } - - return GrpcJavaTest(t, action, options...) -} - -func GrpcJavaExectueContract(t *testing.T, propertiesFile string, contractId string, contractArgument string) (string, string) { - action := "execute-contract" - - options := []string{ - "--properties", propertiesFile, - "--contract-id", contractId, - "--contract-argument", contractArgument, - } - - return GrpcJavaTest(t, action, options...) -} - -func GrpcJavaRegisterContract(t *testing.T, propertiesFile string, contractId string, contractBinaryName string, contractClassFile string) (string, string) { - action := "register-contract" - - options := []string{ - "--properties", propertiesFile, - "--contract-id", contractId, - "--contract-binary-name", contractBinaryName, - "--contract-class-file", contractClassFile, - } - - return GrpcJavaTest(t, action, options...) -} - -func GrpcJavaRegisterCert(t *testing.T, propertiesFile string) (string, string) { - action := "register-cert" - - options := []string{ - "--properties", propertiesFile, - } - - return GrpcJavaTest(t, action, options...) -} - -func GrpcJavaTest(t *testing.T, action string, options ...string) (string, string) { - logger.Logf(t, "Starting Java %s %v", action, options) - command := fmt.Sprintf(`scalardl-java-client-sdk/client/bin/%s`, action) - cmd := exec.Command(command, options...) - - byteOutput, err := cmd.CombinedOutput() - if err != nil { - // It continues the test since it checks error cases as well - } - - response_status := &struct { - Code string `json:"status_code"` - ErrorMessage string `json:"error_message"` - }{} - - if err := json.Unmarshal(byteOutput, &response_status); err != nil { - t.Fatal(err) - } - - logger.Logf(t, "%s", response_status.Code) - logger.Logf(t, "%s", response_status.ErrorMessage) - - return response_status.Code, response_status.ErrorMessage -} - -func GrpcWebTest(t *testing.T, url string, data string) (int, string) { - statusCode, body, err := GrpcWebTestE(t, url, data) - if err != nil { - t.Fatal(err) - } - - return statusCode, body -} - -func GrpcWebTestE(t *testing.T, url string, data string) (int, string, error) { - logger.Logf(t, "Making GRPC_WEB call to URL %s", url) - - client := &http.Client{} - req, err := http.NewRequest("POST", url, bytes.NewBufferString(data)) - - req.Header.Add("Content-Type", "application/grpc-web-text") - req.Header.Add("X-User-Agent", "grpc-web-javascript/0.1") - req.Header.Add("Connection", "keep-alive") - req.Header.Add("Accept", "application/grpc-web-text") - req.Header.Add("X-Grpc-Web", "1") - - resp, err := client.Do(req) - if err != nil { - return -1, "", err - } - - defer resp.Body.Close() - body, err := ioutil.ReadAll(resp.Body) - if err != nil { - return -1, "", err - } - - logger.Logf(t, "%s", string(body)) - message, _ := base64.StdEncoding.DecodeString(string(body)) - - logger.Logf(t, "Reponse Status: %s", resp.Status) - logger.Logf(t, "Reponse Body: %s", string(body)) - logger.Logf(t, "Reponse Message: %s", string(message)) - - return resp.StatusCode, string(message), nil -} diff --git a/test/src/modules/grpc_helper/grpc_web_test.sh b/test/src/modules/grpc_helper/grpc_web_test.sh deleted file mode 100644 index 0b8be6b3a..000000000 --- a/test/src/modules/grpc_helper/grpc_web_test.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/bash - -# Usage Function -function usage() { - if [ -n "$1" ]; then - echo -e "${RED}👉 $1${CLEAR}\n"; - fi - echo "Usage: $0 [-h --host] [-d --data] [-e --expected] [-r --request]" - echo " -h, --host dns host name (required) 'localhost'" - echo " -e, --expected Base64 expected response (required) 'AAAAAFI...'" - echo " -r, --request The request path (required) '/rpc.Ledger/ListContracts'" - echo " -d, --data Base64 data string (required) 'AAAAAFIK...'" - echo " -p, --port Default: 50051 (optional)" - echo " -P, --protocol Default: 'http' Connection Protocol(optional) 'http' or 'https'" - echo " -M, --max_time Default: 10 seconds" - echo " -v, --verbose Enable Verbose Logging" - echo "" - echo "Example: $0 --host localhost --request /rpc.Ledger/ListContracts\ - --expected AAAAAQcIyAESgQJ7IjMiOnsiY29udHJhY3RfbmFtZSI6ImNvbS5vcmcxLmNvbnRyYWN0LlN0YXRlVXBkYXRlciIsImNlcnRfaWQiOiJtZGJveCIsImNlcnRfdmVyc2lvbiI6MSwiY29udHJhY3RfcHJvcGVydGllcyI6e30sInJlZ2lzdGVyZWRfYXQiOjE1NTgzMzQ5NTU0MjUsInNpZ25hdHVyZSI6Ik1FWUNJUURQVXpPVGdvaGE2bzJQV2FWL0xpRmhVMTI1SGpCeVlLYnphT0Z3a1ZxeXlRSWhBTkd6d3ltVjV5SlBhVjZMWG9rbXhEQlZpODNWc0tlNndndTBVSEh4aWhlVyJ9fQ==\ - --data AAAAAFIKBW1kYm94EAEiRzBFAiEAx4josbxWPEuZ7w/imnl5B/xY0FKbQLkuK/E/UFUHbmwCIGBludc3JD3pkTYqmeT186g+rDaoFkLqHg4xCQ8uCL3w" - exit 1 -} - -# Set Default Values -REQUEST_PROTOCOL='http' -SERVER_PORT='50051' -MAX_TIME=10 -VERBOSE='-s' - -# Parse input arguments -while [[ "$#" -gt 0 ]]; do case $1 in - -e|--expected) EXPECTED_DATA="$2"; shift;; - -d|--data) REQUEST_DATA="$2"; shift;; - -m|--method) REQUEST_PROTOCOL="$2"; shift;; - -h|--host) SERVER_HOST="$2"; shift;; - -p|--port) SERVER_PORT="$2"; shift;; - -r|--request) REQUEST_PATH="$2"; shift;; - -H|--help) usage=1;; - -v|--verbose) VERBOSE="-v";; - -M|--max-time) MAX_TIME="$2"; shift;; - *) usage "Unknown parameter passed: $1"; shift;; -esac; shift; done - -# Check if --help -h was passed as argument -if [[ $usage = "1" ]]; then - usage -fi - -# Verify required arguments are set -if [[ -z ${REQUEST_PATH} || -z ${SERVER_HOST} || -z ${EXPECTED_DATA} || -z ${REQUEST_DATA} ]]; then - usage "Missing one or more required arguments"; -fi - -# Start Test -echo "*********************************************************" -echo "* Testing... $REQUEST_PATH" -echo "*" -echo "* SERVER_HOST : $SERVER_HOST" -echo "* SERVER_PORT : $SERVER_PORT" -echo "* REQUEST_PATH : $REQUEST_PATH" -echo "* REQUEST_PROTOCOL: $REQUEST_PROTOCOL" -echo "* REQUEST_DATA : $REQUEST_DATA" -echo "* EXPECTED_DATA : $EXPECTED_DATA" -echo "* MAX_TIME : $MAX_TIME seconds" -echo "*" -echo "* Connecting... $REQUEST_PROTOCOL://$SERVER_HOST:$SERVER_PORT$REQUEST_PATH" - -out=$(curl "$VERBOSE" "$REQUEST_PROTOCOL://$SERVER_HOST:$SERVER_PORT$REQUEST_PATH" \ - -H 'X-User-Agent: grpc-web-javascript/0.1' \ - -H "Origin: $REQUEST_PROTOCOL://$SERVER_HOST:$SERVER_PORT" \ - -H 'Content-Type: application/grpc-web-text' \ - -H 'Accept: application/grpc-web-text' \ - -H 'X-Grpc-Web: 1' \ - -H "Referer: $REQUEST_PROTOCOL://$SERVER_HOST:$POST" \ - -H 'Connection: keep-alive' \ - --max-time $MAX_TIME \ - --data-binary "$REQUEST_DATA" \ - --compressed) - -if [[ "$out" != "$EXPECTED_DATA" ]]; then - echo "*" - echo "* Expected:" - echo "$EXPECTED_DATA" - echo "*" - echo "* Actual:" - echo "$out" - echo "*" - echo "* Failed" - echo "*" - echo "*********************************************************" - exit 1; -fi - -echo "*" -echo "* Passed" -echo "*" -echo "*********************************************************" diff --git a/test/src/modules/prometheus_helper/prometheus_helper.go b/test/src/modules/prometheus_helper/prometheus_helper.go deleted file mode 100644 index 23f6f65fe..000000000 --- a/test/src/modules/prometheus_helper/prometheus_helper.go +++ /dev/null @@ -1,140 +0,0 @@ -package prometheus_helper - -import ( - "encoding/json" - "fmt" - "io/ioutil" - "net/http" - "net/url" - "testing" - - "github.com/gruntwork-io/terratest/modules/logger" -) - -type metric struct { - Name string `json:"__name__"` - Job string `json:"job"` - Role string `json:"role"` - Instance string `json:"instance"` - Alertname string `json:"alertname"` - Alertstate string `json:"alertstate"` -} - -type result struct { - Metric metric `json:"metric"` - Value []interface{} `json:"value"` -} - -type data struct { - ResultType string `json:"resultType"` - Result []result `json:"result"` -} - -type prometheus struct { - Status string `json:"status"` - Data data `json:"data"` -} - -func QueryRule(t *testing.T, host string, rulename string) (int, int, prometheus) { - statusCode, count, response, err := QueryRuleE(t, host, rulename) - if err != nil { - t.Fatal(err) - } - - return statusCode, count, response -} - -func QueryRuleE(t *testing.T, host string, rulename string) (int, int, prometheus, error) { - prometheusUrl, err := url.Parse(host) - if err != nil { - return -1, -1, prometheus{}, err - } - - prometheusUrl, err = prometheusUrl.Parse("/api/v1/query") - if err != nil { - return -1, -1, prometheus{}, err - } - - query := prometheusUrl.Query() - query.Add("query", rulename) - prometheusUrl.RawQuery = query.Encode() - - statusCode, response, err := CallApiE(t, prometheusUrl.String()) - if err != nil { - return -1, -1, prometheus{}, err - } - - count := len(response.Data.Result) - - return statusCode, count, response, nil -} - -func QueryAlert(t *testing.T, host string, alertname string) (int, int, prometheus) { - statusCode, count, response, err := QueryAlertE(t, host, alertname) - if err != nil { - t.Fatal(err) - } - - return statusCode, count, response -} - -func QueryAlertE(t *testing.T, host string, alertname string) (int, int, prometheus, error) { - prometheusUrl, err := url.Parse(host) - if err != nil { - return -1, -1, prometheus{}, err - } - - prometheusUrl, err = prometheusUrl.Parse("/api/v1/query") - if err != nil { - return -1, -1, prometheus{}, err - } - - query := prometheusUrl.Query() - query.Add("query", fmt.Sprintf(`ALERTS{alertname="%s"}`, alertname)) - prometheusUrl.RawQuery = query.Encode() - - statusCode, response, err := CallApiE(t, prometheusUrl.String()) - if err != nil { - return -1, -1, prometheus{}, err - } - - count := len(response.Data.Result) - - return statusCode, count, response, nil -} - -func CallApiE(t *testing.T, urlString string) (int, prometheus, error) { - prometheusUrl, err := url.Parse(urlString) - if err != nil { - return -1, prometheus{}, err - } - - logger.Logf(t, "Making Prometheus API call to URL %s", prometheusUrl.String()) - - client := &http.Client{} - - req, err := http.NewRequest("GET", prometheusUrl.String(), nil) - if err != nil { - return -1, prometheus{}, err - } - - resp, err := client.Do(req) - if err != nil { - return -1, prometheus{}, err - } - - defer resp.Body.Close() - body, err := ioutil.ReadAll(resp.Body) - if err != nil { - return -1, prometheus{}, err - } - - response := prometheus{} - - if err := json.Unmarshal(body, &response); err != nil { - return -1, prometheus{}, err - } - logger.Logf(t, "Prometheus: %+v", response) - - return resp.StatusCode, response, nil -} From 9bb3cc74ea704b63870b440a3ac8a0178efde652 Mon Sep 17 00:00:00 2001 From: tei-k Date: Wed, 9 Dec 2020 17:27:47 +0900 Subject: [PATCH 2/5] Fix workflow --- .github/workflows/aws_ca.yml | 16 +--- .github/workflows/aws_ca_example.yml | 49 ------------ .github/workflows/aws_cassandra.yml | 19 ++--- .github/workflows/aws_cassandra_example.yml | 53 ------------- .github/workflows/aws_monitor.yml | 16 +--- .github/workflows/aws_monitor_example.yml | 49 ------------ .github/workflows/aws_network.yml | 11 +-- .github/workflows/aws_network_example.yml | 51 ------------- .github/workflows/aws_pulsar.yml | 12 +-- .github/workflows/aws_pulsar_example.yml | 43 ----------- .github/workflows/aws_scalardl.yml | 16 +--- .github/workflows/aws_scalardl_example.yml | 51 ------------- .github/workflows/aws_terratest.yml | 74 ------------------ .github/workflows/azure_ca.yml | 18 +---- .github/workflows/azure_ca_example.yml | 51 ------------- .github/workflows/azure_cassandra.yml | 18 +---- .github/workflows/azure_cassandra_example.yml | 55 -------------- .github/workflows/azure_kubernetes.yaml | 18 +---- .../workflows/azure_kubernetes_example.yaml | 45 ----------- .github/workflows/azure_monitor.yml | 18 +---- .github/workflows/azure_monitor_example.yml | 51 ------------- .github/workflows/azure_network.yml | 13 +--- .github/workflows/azure_network_example.yml | 53 ------------- .github/workflows/azure_scalardl.yml | 18 +---- .github/workflows/azure_scalardl_example.yml | 53 ------------- .github/workflows/azure_terratest.yml | 76 ------------------- 26 files changed, 37 insertions(+), 910 deletions(-) delete mode 100644 .github/workflows/aws_ca_example.yml delete mode 100644 .github/workflows/aws_cassandra_example.yml delete mode 100644 .github/workflows/aws_monitor_example.yml delete mode 100644 .github/workflows/aws_network_example.yml delete mode 100644 .github/workflows/aws_pulsar_example.yml delete mode 100644 .github/workflows/aws_scalardl_example.yml delete mode 100644 .github/workflows/aws_terratest.yml delete mode 100644 .github/workflows/azure_ca_example.yml delete mode 100644 .github/workflows/azure_cassandra_example.yml delete mode 100644 .github/workflows/azure_kubernetes_example.yaml delete mode 100644 .github/workflows/azure_monitor_example.yml delete mode 100644 .github/workflows/azure_network_example.yml delete mode 100644 .github/workflows/azure_scalardl_example.yml delete mode 100644 .github/workflows/azure_terratest.yml diff --git a/.github/workflows/aws_ca.yml b/.github/workflows/aws_ca.yml index 82fb9e070..d41bcd596 100644 --- a/.github/workflows/aws_ca.yml +++ b/.github/workflows/aws_ca.yml @@ -7,7 +7,7 @@ on: paths: - modules/aws/ca/** - modules/universal/ca/** - - test/modules/awsdeploy/ca/** + - example/aws/ca/** - provision/ansible/** push: branches: @@ -15,7 +15,7 @@ on: paths: - modules/aws/ca/** - modules/universal/ca/** - - test/modules/awsdeploy/ca/** + - example/aws/ca/** - provision/ansible/** jobs: @@ -23,12 +23,10 @@ jobs: name: Terraform runs-on: ubuntu-latest env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} TF_VERSION: 0.12.29 defaults: run: - working-directory: ./test/modules/awsdeploy/ca + working-directory: ./example/aws/ca steps: - name: Checkout @@ -39,11 +37,6 @@ jobs: with: terraform_version: ${{ env.TF_VERSION }} - - name: Set up to using dummy local variables - run: | - rm -f remote.tf locals.tf - mv locals.tf.dummy locals.tf - - name: Terraform Format run: terraform fmt -check -recursive working-directory: ./modules/aws/ca @@ -53,6 +46,3 @@ jobs: - name: Terraform Validate run: terraform validate -no-color - - - name: Terraform Plan - run: terraform plan -no-color diff --git a/.github/workflows/aws_ca_example.yml b/.github/workflows/aws_ca_example.yml deleted file mode 100644 index e34993d47..000000000 --- a/.github/workflows/aws_ca_example.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Terraform test for CA module of AWS Example - -on: - pull_request: - branches: - - master - paths: - - modules/aws/ca/** - - modules/universal/ca/** - - examples/aws/ca/** - - provision/ansible/** - push: - branches: - - master - paths: - - modules/aws/ca/** - - modules/universal/ca/** - - examples/aws/ca/** - - provision/ansible/** - -jobs: - terraform: - name: Terraform - runs-on: ubuntu-latest - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - TF_VERSION: 0.12.29 - defaults: - run: - working-directory: ./examples/aws/ca - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup Terraform - uses: hashicorp/setup-terraform@v1 - with: - terraform_version: ${{ env.TF_VERSION }} - - - name: Terraform Format - run: terraform fmt -check - - - name: Terraform Init - run: terraform init - - - name: Terraform Validate - run: terraform validate -no-color diff --git a/.github/workflows/aws_cassandra.yml b/.github/workflows/aws_cassandra.yml index af027f39c..94ab3cfff 100644 --- a/.github/workflows/aws_cassandra.yml +++ b/.github/workflows/aws_cassandra.yml @@ -9,8 +9,7 @@ on: - modules/universal/cassandra/** - modules/universal/cassy/** - modules/universal/reaper/** - - test/modules/awsdeploy/cassandra/** - - provision/** + - example/aws/cassandra/** push: branches: - master @@ -19,20 +18,17 @@ on: - modules/universal/cassandra/** - modules/universal/cassy/** - modules/universal/reaper/** - - test/modules/awsdeploy/cassandra/** - - provision/** + - example/aws/cassandra/** jobs: terraform: name: Terraform runs-on: ubuntu-latest env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} TF_VERSION: 0.12.29 defaults: run: - working-directory: ./test/modules/awsdeploy/cassandra + working-directory: ./example/aws/cassandra steps: - name: Checkout @@ -43,10 +39,8 @@ jobs: with: terraform_version: ${{ env.TF_VERSION }} - - name: Set up to using dummy local variables - run: | - rm -f remote.tf locals.tf - mv locals.tf.dummy locals.tf + - name: Terraform Init + run: terraform init - name: Terraform Format run: terraform fmt -check -recursive @@ -57,6 +51,3 @@ jobs: - name: Terraform Validate run: terraform validate -no-color - - - name: Terraform Plan - run: terraform plan -no-color diff --git a/.github/workflows/aws_cassandra_example.yml b/.github/workflows/aws_cassandra_example.yml deleted file mode 100644 index 41cd66657..000000000 --- a/.github/workflows/aws_cassandra_example.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Terraform test for Cassandra module of AWS Example - -on: - pull_request: - branches: - - master - paths: - - modules/aws/cassandra/** - - modules/universal/cassandra/** - - modules/universal/cassy/** - - modules/universal/reaper/** - - examples/aws/cassandra/** - - provision/ansible/** - push: - branches: - - master - paths: - - modules/aws/cassandra/** - - modules/universal/cassandra/** - - modules/universal/cassy/** - - modules/universal/reaper/** - - examples/aws/cassandra/** - - provision/ansible/** - -jobs: - terraform: - name: Terraform - runs-on: ubuntu-latest - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - TF_VERSION: 0.12.29 - defaults: - run: - working-directory: ./examples/aws/cassandra - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup Terraform - uses: hashicorp/setup-terraform@v1 - with: - terraform_version: ${{ env.TF_VERSION }} - - - name: Terraform Format - run: terraform fmt -check - - - name: Terraform Init - run: terraform init - - - name: Terraform Validate - run: terraform validate -no-color diff --git a/.github/workflows/aws_monitor.yml b/.github/workflows/aws_monitor.yml index be180dc1b..5779b2582 100644 --- a/.github/workflows/aws_monitor.yml +++ b/.github/workflows/aws_monitor.yml @@ -7,7 +7,7 @@ on: paths: - modules/aws/monitor/** - modules/universal/monitor/** - - test/modules/awsdeploy/monitor/** + - example/aws/monitor/** - provision/** push: branches: @@ -15,7 +15,7 @@ on: paths: - modules/aws/monitor/** - modules/universal/monitor/** - - test/modules/awsdeploy/monitor/** + - example/aws/monitor/** - provision/** jobs: @@ -23,12 +23,10 @@ jobs: name: Terraform runs-on: ubuntu-latest env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} TF_VERSION: 0.12.29 defaults: run: - working-directory: ./test/modules/awsdeploy/monitor + working-directory: ./example/aws/monitor steps: - name: Checkout @@ -39,11 +37,6 @@ jobs: with: terraform_version: ${{ env.TF_VERSION }} - - name: Set up to using dummy local variables - run: | - rm -f remote.tf locals.tf - mv locals.tf.dummy locals.tf - - name: Terraform Format run: terraform fmt -check -recursive working-directory: ./modules/aws/monitor @@ -53,6 +46,3 @@ jobs: - name: Terraform Validate run: terraform validate -no-color - - - name: Terraform Plan - run: terraform plan -no-color diff --git a/.github/workflows/aws_monitor_example.yml b/.github/workflows/aws_monitor_example.yml deleted file mode 100644 index f4eff1772..000000000 --- a/.github/workflows/aws_monitor_example.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Terraform test for Monitor module of AWS Example - -on: - pull_request: - branches: - - master - paths: - - modules/aws/monitor/** - - modules/universal/monitor/** - - examples/aws/monitor/** - - provision/ansible/** - push: - branches: - - master - paths: - - modules/aws/monitor/** - - modules/universal/monitor/** - - examples/aws/monitor/** - - provision/ansible/** - -jobs: - terraform: - name: Terraform - runs-on: ubuntu-latest - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - TF_VERSION: 0.12.29 - defaults: - run: - working-directory: ./examples/aws/monitor - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup Terraform - uses: hashicorp/setup-terraform@v1 - with: - terraform_version: ${{ env.TF_VERSION }} - - - name: Terraform Format - run: terraform fmt -check - - - name: Terraform Init - run: terraform init - - - name: Terraform Validate - run: terraform validate -no-color diff --git a/.github/workflows/aws_network.yml b/.github/workflows/aws_network.yml index b6dfb43f3..3ea349abb 100644 --- a/.github/workflows/aws_network.yml +++ b/.github/workflows/aws_network.yml @@ -8,7 +8,7 @@ on: - modules/aws/network/** - modules/universal/bastion/** - modules/universal/name-generator/** - - test/modules/awsdeploy/network/** + - examples/aws/network/** - provision/** push: branches: @@ -17,7 +17,7 @@ on: - modules/aws/network/** - modules/universal/bastion/** - modules/universal/name-generator/** - - test/modules/awsdeploy/network/** + - examples/aws/network/** - provision/** jobs: @@ -25,12 +25,10 @@ jobs: name: Terraform runs-on: ubuntu-latest env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} TF_VERSION: 0.12.29 defaults: run: - working-directory: ./test/modules/awsdeploy/network + working-directory: ./examples/aws/network/** steps: - name: Checkout @@ -50,6 +48,3 @@ jobs: - name: Terraform Validate run: terraform validate -no-color - - - name: Terraform Plan - run: terraform plan -no-color diff --git a/.github/workflows/aws_network_example.yml b/.github/workflows/aws_network_example.yml deleted file mode 100644 index 41fa5a051..000000000 --- a/.github/workflows/aws_network_example.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Terraform test for Network module of AWS Example - -on: - pull_request: - branches: - - master - paths: - - modules/aws/network/** - - modules/universal/bastion/** - - modules/universal/name-generator/** - - examples/aws/network/** - - provision/ansible/** - push: - branches: - - master - paths: - - modules/aws/network/** - - modules/universal/bastion/** - - modules/universal/name-generator/** - - examples/aws/network/** - - provision/ansible/** - -jobs: - terraform: - name: Terraform - runs-on: ubuntu-latest - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - TF_VERSION: 0.12.29 - defaults: - run: - working-directory: ./examples/aws/network - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup Terraform - uses: hashicorp/setup-terraform@v1 - with: - terraform_version: ${{ env.TF_VERSION }} - - - name: Terraform Format - run: terraform fmt -check - - - name: Terraform Init - run: terraform init - - - name: Terraform Validate - run: terraform validate -no-color diff --git a/.github/workflows/aws_pulsar.yml b/.github/workflows/aws_pulsar.yml index b5093b527..16f4067be 100644 --- a/.github/workflows/aws_pulsar.yml +++ b/.github/workflows/aws_pulsar.yml @@ -6,19 +6,19 @@ on: - master paths: - modules/aws/pulsar/** + - examples/aws/pulsar/** push: branches: - master paths: - modules/aws/pulsar/** + - examples/aws/pulsar/** jobs: terraform: name: Terraform runs-on: ubuntu-latest env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} TF_VERSION: 0.12.29 defaults: run: @@ -33,11 +33,6 @@ jobs: with: terraform_version: ${{ env.TF_VERSION }} - - name: Set up to using dummy local variables - run: | - rm -f remote.tf locals.tf - mv locals.tf.dummy locals.tf - - name: Terraform Format run: terraform fmt -check -recursive working-directory: ./modules/aws/pulsar @@ -47,6 +42,3 @@ jobs: - name: Terraform Validate run: terraform validate -no-color - - - name: Terraform Plan - run: terraform plan -no-color diff --git a/.github/workflows/aws_pulsar_example.yml b/.github/workflows/aws_pulsar_example.yml deleted file mode 100644 index c52e77bcd..000000000 --- a/.github/workflows/aws_pulsar_example.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Terraform test for Pulsar module of AWS Example - -on: - pull_request: - branches: - - master - paths: - - modules/aws/pulsar/** - push: - branches: - - master - paths: - - modules/aws/pulsar/** - -jobs: - terraform: - name: Terraform - runs-on: ubuntu-latest - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - TF_VERSION: 0.12.29 - defaults: - run: - working-directory: ./examples/aws/pulsar - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup Terraform - uses: hashicorp/setup-terraform@v1 - with: - terraform_version: ${{ env.TF_VERSION }} - - - name: Terraform Format - run: terraform fmt -check - - - name: Terraform Init - run: terraform init - - - name: Terraform Validate - run: terraform validate -no-color diff --git a/.github/workflows/aws_scalardl.yml b/.github/workflows/aws_scalardl.yml index 5087e5294..38e2d4092 100644 --- a/.github/workflows/aws_scalardl.yml +++ b/.github/workflows/aws_scalardl.yml @@ -8,7 +8,7 @@ on: - modules/aws/scalardl/** - modules/universal/scalardl/** - modules/universal/envoy/** - - test/modules/awsdeploy/scalardl/** + - examples/aws/scalardl/** - provision/** push: branches: @@ -17,7 +17,7 @@ on: - modules/aws/scalardl/** - modules/universal/scalardl/** - modules/universal/envoy/** - - test/modules/awsdeploy/scalardl/** + - examples/aws/scalardl/** - provision/** jobs: @@ -25,12 +25,10 @@ jobs: name: Terraform runs-on: ubuntu-latest env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} TF_VERSION: 0.12.29 defaults: run: - working-directory: ./test/modules/awsdeploy/scalardl + working-directory: ./examples/aws/scalardl steps: - name: Checkout @@ -41,11 +39,6 @@ jobs: with: terraform_version: ${{ env.TF_VERSION }} - - name: Set up to using dummy local variables - run: | - rm -f remote.tf locals.tf - mv locals.tf.dummy locals.tf - - name: Terraform Format run: terraform fmt -check -recursive working-directory: ./modules/aws/scalardl @@ -55,6 +48,3 @@ jobs: - name: Terraform Validate run: terraform validate -no-color - - - name: Terraform Plan - run: terraform plan -no-color diff --git a/.github/workflows/aws_scalardl_example.yml b/.github/workflows/aws_scalardl_example.yml deleted file mode 100644 index 06ece3e09..000000000 --- a/.github/workflows/aws_scalardl_example.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Terraform test for Scalar DL module of AWS Example - -on: - pull_request: - branches: - - master - paths: - - modules/aws/scalardl/** - - modules/universal/scalardl/** - - modules/universal/envoy/** - - examples/aws/scalardl/** - - provision/ansible/** - push: - branches: - - master - paths: - - modules/aws/scalardl/** - - modules/universal/scalardl/** - - modules/universal/envoy/** - - examples/aws/scalardl/** - - provision/ansible/** - -jobs: - terraform: - name: Terraform - runs-on: ubuntu-latest - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - TF_VERSION: 0.12.29 - defaults: - run: - working-directory: ./examples/aws/scalardl - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup Terraform - uses: hashicorp/setup-terraform@v1 - with: - terraform_version: ${{ env.TF_VERSION }} - - - name: Terraform Format - run: terraform fmt -check - - - name: Terraform Init - run: terraform init - - - name: Terraform Validate - run: terraform validate -no-color diff --git a/.github/workflows/aws_terratest.yml b/.github/workflows/aws_terratest.yml deleted file mode 100644 index 2124ad950..000000000 --- a/.github/workflows/aws_terratest.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: Integration-test-with-terratest-for-AWS - -on: - schedule: - - cron: 0 15 * * * - -jobs: - terratest: - name: Terratest - runs-on: ubuntu-latest - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - TF_VERSION: 0.12.29 - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup Terraform - uses: hashicorp/setup-terraform@v1 - with: - terraform_version: ${{ env.TF_VERSION }} - terraform_wrapper: false - - - name: Docker login - run: echo ${DOCKER_PASSWORD} | docker login -u scalartest --password-stdin docker.io - env: - DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }} - - - name: Download scalardl client sdk - run: | - curl -L https://github.com/scalar-labs/scalardl-java-client-sdk/archive/v${SCALARDL_JAVA_CLIENT_SDK_VERSION}.tar.gz | tar xvzf - - mv ./scalardl-java-client-sdk-${SCALARDL_JAVA_CLIENT_SDK_VERSION} ./scalardl-java-client-sdk - env: - SCALARDL_JAVA_CLIENT_SDK_VERSION: 2.1.0 - working-directory: ./test/src/integration - - - name: Set up GO - uses: actions/setup-go@v1 - with: - go-version: 1.13.5 - id: go - - - name: Create ssh key - run: | - ssh-keygen -N "" -t rsa -f test_key << Date: Wed, 9 Dec 2020 17:29:25 +0900 Subject: [PATCH 3/5] Fix readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0c5ce1696..aab883cf8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -[![AWS Integration Test](https://github.com/scalar-labs/scalar-terraform/workflows/Integration-test-with-terratest-for-AWS/badge.svg?branch=master)](https://github.com/scalar-labs/scalar-terraform/actions) +[![AWS Integration Test](https://github.com/scalar-labs/scalar-terratest/workflows/Integration-test-with-terratest-for-AWS/badge.svg?branch=master)](https://github.com/scalar-labs/scalar-terratest/actions) -[![Azure Integration Test](https://github.com/scalar-labs/scalar-terraform/workflows/Integration-test-with-terratest-for-Azure/badge.svg?branch=master)](https://github.com/scalar-labs/scalar-terraform/actions) +[![Azure Integration Test](https://github.com/scalar-labs/scalar-terratest/workflows/Integration-test-with-terratest-for-Azure/badge.svg?branch=master)](https://github.com/scalar-labs/scalar-terratest/actions) # Scalar Terraform: Terraform modules for Scalar DLT orchestration Scalar Terraform is a set of terraform modules and provisioing scritps that can be used to orchestrate a Scalar DLT network in a cloud. Cloud providers that it currently supports are AWS and Azure. Note that the current version only supports deployment of single Scalar DLT cluster, that is, it does not support multi-cluster Scalar DLT deployment where multiple ledgers are managed independently through Scalar DM. From c6a4343bd897d34719aa95787ad7650f32c7125f Mon Sep 17 00:00:00 2001 From: tei-k Date: Wed, 9 Dec 2020 18:53:14 +0900 Subject: [PATCH 4/5] Fix terraform fmt in github actions --- .github/workflows/aws_ca.yml | 3 +-- .github/workflows/aws_cassandra.yml | 6 +----- .github/workflows/aws_monitor.yml | 3 +-- .github/workflows/aws_network.yml | 5 ++--- .github/workflows/aws_pulsar.yml | 5 ++--- .github/workflows/aws_scalardl.yml | 3 +-- .github/workflows/azure_ca.yml | 3 +-- .github/workflows/azure_cassandra.yml | 3 +-- .github/workflows/azure_kubernetes.yaml | 2 +- .github/workflows/azure_monitor.yml | 3 +-- .github/workflows/azure_network.yml | 3 +-- .github/workflows/azure_scalardl.yml | 3 +-- 12 files changed, 14 insertions(+), 28 deletions(-) diff --git a/.github/workflows/aws_ca.yml b/.github/workflows/aws_ca.yml index d41bcd596..de5dfa4e1 100644 --- a/.github/workflows/aws_ca.yml +++ b/.github/workflows/aws_ca.yml @@ -38,8 +38,7 @@ jobs: terraform_version: ${{ env.TF_VERSION }} - name: Terraform Format - run: terraform fmt -check -recursive - working-directory: ./modules/aws/ca + run: for d in . ../../../modules/aws/ca ; do cd ${d} && terraform fmt -check -recursive ;done - name: Terraform Init run: terraform init diff --git a/.github/workflows/aws_cassandra.yml b/.github/workflows/aws_cassandra.yml index 94ab3cfff..b6ef15e15 100644 --- a/.github/workflows/aws_cassandra.yml +++ b/.github/workflows/aws_cassandra.yml @@ -39,12 +39,8 @@ jobs: with: terraform_version: ${{ env.TF_VERSION }} - - name: Terraform Init - run: terraform init - - name: Terraform Format - run: terraform fmt -check -recursive - working-directory: ./modules/aws/cassandra + run: for d in . ../../../modules/aws/cassandra ; do cd ${d} && terraform fmt -check -recursive ;done - name: Terraform Init run: terraform init diff --git a/.github/workflows/aws_monitor.yml b/.github/workflows/aws_monitor.yml index 5779b2582..190674de2 100644 --- a/.github/workflows/aws_monitor.yml +++ b/.github/workflows/aws_monitor.yml @@ -38,8 +38,7 @@ jobs: terraform_version: ${{ env.TF_VERSION }} - name: Terraform Format - run: terraform fmt -check -recursive - working-directory: ./modules/aws/monitor + run: for d in . ../../../modules/aws/monitor ; do cd ${d} && terraform fmt -check -recursive ;done - name: Terraform Init run: terraform init diff --git a/.github/workflows/aws_network.yml b/.github/workflows/aws_network.yml index 3ea349abb..56861fdf7 100644 --- a/.github/workflows/aws_network.yml +++ b/.github/workflows/aws_network.yml @@ -28,7 +28,7 @@ jobs: TF_VERSION: 0.12.29 defaults: run: - working-directory: ./examples/aws/network/** + working-directory: ./examples/aws/network steps: - name: Checkout @@ -40,8 +40,7 @@ jobs: terraform_version: ${{ env.TF_VERSION }} - name: Terraform Format - run: terraform fmt -check -recursive - working-directory: ./modules/aws/network + run: for d in . ../../../modules/aws/network ; do cd ${d} && terraform fmt -check -recursive ;done - name: Terraform Init run: terraform init diff --git a/.github/workflows/aws_pulsar.yml b/.github/workflows/aws_pulsar.yml index 16f4067be..4a86c0763 100644 --- a/.github/workflows/aws_pulsar.yml +++ b/.github/workflows/aws_pulsar.yml @@ -22,7 +22,7 @@ jobs: TF_VERSION: 0.12.29 defaults: run: - working-directory: ./test/modules/awsdeploy/pulsar + working-directory: ./examples/aws/pulsar steps: - name: Checkout @@ -34,8 +34,7 @@ jobs: terraform_version: ${{ env.TF_VERSION }} - name: Terraform Format - run: terraform fmt -check -recursive - working-directory: ./modules/aws/pulsar + run: for d in . ../../../modules/aws/pulsar ; do cd ${d} && terraform fmt -check -recursive ;done - name: Terraform Init run: terraform init diff --git a/.github/workflows/aws_scalardl.yml b/.github/workflows/aws_scalardl.yml index 38e2d4092..77c13975b 100644 --- a/.github/workflows/aws_scalardl.yml +++ b/.github/workflows/aws_scalardl.yml @@ -40,8 +40,7 @@ jobs: terraform_version: ${{ env.TF_VERSION }} - name: Terraform Format - run: terraform fmt -check -recursive - working-directory: ./modules/aws/scalardl + run: for d in . ../../../modules/azure/scalardl ; do cd ${d} && terraform fmt -check -recursive ;done - name: Terraform Init run: terraform init diff --git a/.github/workflows/azure_ca.yml b/.github/workflows/azure_ca.yml index 644d37d92..0adfa3e14 100644 --- a/.github/workflows/azure_ca.yml +++ b/.github/workflows/azure_ca.yml @@ -38,8 +38,7 @@ jobs: terraform_version: ${{ env.TF_VERSION }} - name: Terraform Format - run: terraform fmt -check -recursive - working-directory: ./modules/azure/ca + run: for d in . ../../../modules/azure/ca ; do cd ${d} && terraform fmt -check -recursive ;done - name: Terraform Init run: terraform init diff --git a/.github/workflows/azure_cassandra.yml b/.github/workflows/azure_cassandra.yml index 52b41b42c..40a4b8508 100644 --- a/.github/workflows/azure_cassandra.yml +++ b/.github/workflows/azure_cassandra.yml @@ -42,8 +42,7 @@ jobs: terraform_version: ${{ env.TF_VERSION }} - name: Terraform Format - run: terraform fmt -check -recursive - working-directory: ./modules/azure/cassandra + run: for d in . ../../../modules/azure/cassandra ; do cd ${d} && terraform fmt -check -recursive ;done - name: Terraform Init run: terraform init diff --git a/.github/workflows/azure_kubernetes.yaml b/.github/workflows/azure_kubernetes.yaml index b2e7d9147..83f24871f 100644 --- a/.github/workflows/azure_kubernetes.yaml +++ b/.github/workflows/azure_kubernetes.yaml @@ -32,7 +32,7 @@ jobs: terraform_version: ${{ env.TF_VERSION }} - name: Terraform Format - run: terraform fmt -check + run: for d in . ../../../modules/azure/kubernetes ; do cd ${d} && terraform fmt -check -recursive ;done - name: Terraform Init run: terraform init diff --git a/.github/workflows/azure_monitor.yml b/.github/workflows/azure_monitor.yml index 99814384b..b33529c22 100644 --- a/.github/workflows/azure_monitor.yml +++ b/.github/workflows/azure_monitor.yml @@ -38,8 +38,7 @@ jobs: terraform_version: ${{ env.TF_VERSION }} - name: Terraform Format - run: terraform fmt -check -recursive - working-directory: ./modules/azure/monitor + run: for d in . ../../../modules/azure/monitor ; do cd ${d} && terraform fmt -check -recursive ;done - name: Terraform Init run: terraform init diff --git a/.github/workflows/azure_network.yml b/.github/workflows/azure_network.yml index 2b2669538..7e4eec8e8 100644 --- a/.github/workflows/azure_network.yml +++ b/.github/workflows/azure_network.yml @@ -40,8 +40,7 @@ jobs: terraform_version: ${{ env.TF_VERSION }} - name: Terraform Format - run: terraform fmt -check -recursive - working-directory: ./modules/azure/network + run: for d in . ../../../modules/azure/network ; do cd ${d} && terraform fmt -check -recursive ;done - name: Terraform Init run: terraform init diff --git a/.github/workflows/azure_scalardl.yml b/.github/workflows/azure_scalardl.yml index dc50cc7e6..2d43069ff 100644 --- a/.github/workflows/azure_scalardl.yml +++ b/.github/workflows/azure_scalardl.yml @@ -40,8 +40,7 @@ jobs: terraform_version: ${{ env.TF_VERSION }} - name: Terraform Format - run: terraform fmt -check -recursive - working-directory: ./modules/azure/scalardl + run: for d in . ../../../modules/azure/scalardl ; do cd ${d} && terraform fmt -check -recursive ;done - name: Terraform Init run: terraform init From 68484945fae3f6885419713664f04c29427e2f7b Mon Sep 17 00:00:00 2001 From: tei-k Date: Wed, 9 Dec 2020 18:55:18 +0900 Subject: [PATCH 5/5] Add workflow for aws kubernetes --- .github/workflows/aws_kubernetes.yaml | 41 +++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/aws_kubernetes.yaml diff --git a/.github/workflows/aws_kubernetes.yaml b/.github/workflows/aws_kubernetes.yaml new file mode 100644 index 000000000..c46f82641 --- /dev/null +++ b/.github/workflows/aws_kubernetes.yaml @@ -0,0 +1,41 @@ +name: Terraform test for Kubernetes module of AWS +on: + pull_request: + branches: + - master + paths: + - modules/aws/kubernetes/** + - example/aws/kubernetes/** + push: + branches: + - master + paths: + - modules/aws/kubernetes/** + - example/aws/kubernetes/** +defaults: + run: + working-directory: ./example/aws/kubernetes +jobs: + terraform: + name: Terraform + runs-on: ubuntu-latest + env: + TF_VERSION: 0.12.29 + + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Setup Terraform + uses: hashicorp/setup-terraform@v1 + with: + terraform_version: ${{ env.TF_VERSION }} + + - name: Terraform Format + run: for d in . ../../../modules/aws/kubernetes ; do cd ${d} && terraform fmt -check -recursive ;done + + - name: Terraform Init + run: terraform init + + - name: Terraform Validate + run: terraform validate -no-color