Skip to content

Commit

Permalink
Merge pull request #43 from wyTrivail/terraform1
Browse files Browse the repository at this point in the history
fix soaking test in ec2
  • Loading branch information
wyTrivail authored Oct 27, 2020
2 parents 8352978 + 031d79d commit ee46b5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion terraform/ec2/soaking.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 = "../../"
}
}
2 changes: 1 addition & 1 deletion terraform/ec2/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ variable "package_s3_bucket" {
}

variable "aoc_version" {
default = "v0.1.12-291936394"
default = "v0.1.0-324996423"
}

variable "region" {
Expand Down

0 comments on commit ee46b5e

Please sign in to comment.