From 031d79d549460c48c2a701304351cb5090a8c923 Mon Sep 17 00:00:00 2001 From: Ying Wang Date: Tue, 27 Oct 2020 10:08:56 -0700 Subject: [PATCH] fix soaking test in ec2 --- terraform/ec2/soaking.tf | 3 ++- terraform/ec2/variables.tf | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/terraform/ec2/soaking.tf b/terraform/ec2/soaking.tf index a2f8232b9..24a41ea99 100644 --- a/terraform/ec2/soaking.tf +++ b/terraform/ec2/soaking.tf @@ -65,6 +65,7 @@ resource "time_sleep" "wait_2_minutes" { } # cpu alarm resource "aws_cloudwatch_metric_alarm" "cpu_alarm" { + count = var.soaking ? 1 : 0 depends_on = [time_sleep.wait_2_minutes] alarm_name = "otel-soaking-cpu-alarm-${module.common.testing_id}" comparison_operator = "GreaterThanOrEqualToThreshold" @@ -95,7 +96,7 @@ resource "null_resource" "bake_alarms" { depends_on = [aws_cloudwatch_metric_alarm.cpu_alarm] count = var.soaking ? 1 : 0 provisioner "local-exec" { - command = "${module.common.validator_path} --args='-c ${var.validation_config} -t ${module.common.testing_id} --region ${var.region} --alarm-names ${aws_cloudwatch_metric_alarm.cpu_alarm.alarm_name}'" + command = "${module.common.validator_path} --args='-c ${var.validation_config} -t ${module.common.testing_id} --region ${var.region} --alarm-names ${aws_cloudwatch_metric_alarm.cpu_alarm[0].alarm_name}'" working_dir = "../../" } } diff --git a/terraform/ec2/variables.tf b/terraform/ec2/variables.tf index b9c4e12b4..7a3aa7e12 100644 --- a/terraform/ec2/variables.tf +++ b/terraform/ec2/variables.tf @@ -29,7 +29,7 @@ variable "package_s3_bucket" { } variable "aoc_version" { - default = "v0.1.12-291936394" + default = "v0.1.0-324996423" } variable "region" {