diff --git a/.github/workflows/bot-defense-re.yaml b/.github/workflows/bot-defense-re.yaml index 2794e4902..5411e0b91 100644 --- a/.github/workflows/bot-defense-re.yaml +++ b/.github/workflows/bot-defense-re.yaml @@ -83,3 +83,11 @@ jobs: - name: Terraform Apply if: github.ref == 'refs/heads/bot-defense-re' && github.event_name == 'push' run: terraform apply -auto-approve -input=false + + - name: Run Traffic + run: | + cp ../tools/run-curl-traffic.sh . + domain1 = "$terraform output -raw lb_domain.0" + domain2 = "$terraform output -raw lb_domain.1" + .\run-curl-traffic.sh $domain1 + .\run-curl-traffic.sh $domain2 diff --git a/tools/run-curl-traffic.sh b/tools/run-curl-traffic.sh new file mode 100644 index 000000000..6f1d483cf --- /dev/null +++ b/tools/run-curl-traffic.sh @@ -0,0 +1,8 @@ +for run in {1..10} +do + echo "Running commands against website Address - $1" + curl -s "$1" -i -X POST -d "username=1&password=1" + sleep 10 + echo CURL Credential Stuffing attempt "$run" done + sleep 2 +done diff --git a/xc/outputs.tf b/xc/outputs.tf index bd96008b9..de5e9164a 100644 --- a/xc/outputs.tf +++ b/xc/outputs.tf @@ -9,4 +9,7 @@ output "endpoint" { } output "az_ce_site_pub_ip" { value = var.az_ce_site ? regex("master_public_ip_address = \"((?:\\d{1,3}\\.){3}\\d{1,3})\"", volterra_tf_params_action.action_apply[0].tf_output) : null +} +output "lb_domain" { + value = volterra_http_loadbalancer.lb_https.domains } \ No newline at end of file diff --git a/xc/terraform.tfvars b/xc/terraform.tfvars index 3ae519047..6dfbfa6ea 100644 --- a/xc/terraform.tfvars +++ b/xc/terraform.tfvars @@ -63,6 +63,7 @@ xc_api_val_custom = false xc_bot_def = false xc_bot_path = "/user" need_infra = false +site_name = "sv10-sjc" #XC DDoS xc_ddos_pro = false @@ -73,4 +74,4 @@ xc_mud = false # CE configs gcp_ce_site = "false" aws_ce_site = "false" -site_name = "sj10-sjc" + diff --git a/xc/xc_vk8s.tf b/xc/xc_vk8s.tf index c0f639a08..5e5ab958a 100644 --- a/xc/xc_vk8s.tf +++ b/xc/xc_vk8s.tf @@ -3,7 +3,7 @@ resource "volterra_namespace" "this" { count = var.vk8s ? 1 : 0 name = var.xc_namespace } - +/* # create virtual site resource "volterra_virtual_site" "this" { count = var.vk8s ? 1 : 0 @@ -14,16 +14,16 @@ resource "volterra_virtual_site" "this" { expressions = [format("ves.io/siteName == %s", var.site_name)] } site_type = "REGIONAL_EDGE" -} +}*/ # create vK8s resource "volterra_virtual_k8s" "this" { name = "${local.project_prefix}-${local.build_suffix}-vk8s" namespace = var.xc_namespace - depends_on = [volterra_virtual_site.this] + depends_on = [volterra_namespace.this] vsite_refs { - name = volterra_virtual_site.this.0.name - namespace = var.xc_namespace + name = "ves-io-all-res" + namespace = "shared" } provisioner "local-exec" {