File tree 7 files changed +24
-0
lines changed
autoscaling-scheduler-terminate-instances
7 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 1
1
run "create_test_infrastructure" {
2
2
command = apply
3
3
4
+ variables {
5
+ test_mode = true
6
+ }
7
+
4
8
assert {
5
9
condition = module. autoscaling-stop-friday . scheduler_lambda_name == " stop-autoscaling-${ random_pet . suffix . id } "
6
10
error_message = " Invalid Stop lambda name"
Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ module "autoscaling-start-monday" {
107
107
}
108
108
109
109
module "test-execution" {
110
+ count = var. test_mode ? 1 : 0
110
111
source = " ./test-execution"
111
112
112
113
lambda_stop_name = module. autoscaling-stop-friday . scheduler_lambda_name
Original file line number Diff line number Diff line change 1
1
run "create_test_infrastructure" {
2
2
command = apply
3
3
4
+ variables {
5
+ test_mode = true
6
+ }
7
+
4
8
assert {
5
9
condition = module. autoscaling-stop-friday . scheduler_lambda_name == " stop-autoscaling-${ random_pet . suffix . id } "
6
10
error_message = " Invalid Stop lambda name"
Original file line number Diff line number Diff line change
1
+ variable "test_mode" {
2
+ description = " Whether to run in test mode"
3
+ type = bool
4
+ default = false
5
+ }
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ module "ec2-start-monday" {
76
76
}
77
77
78
78
module "test-execution" {
79
+ count = var. test_mode ? 1 : 0
79
80
source = " ./test-execution"
80
81
81
82
lambda_stop_name = module. ec2-stop-friday . scheduler_lambda_name
Original file line number Diff line number Diff line change 1
1
run "create_test_infrastructure" {
2
2
command = apply
3
3
4
+ variables {
5
+ test_mode = true
6
+ }
7
+
4
8
assert {
5
9
condition = module. ec2-stop-friday . scheduler_lambda_name == " stop-ec2-${ random_pet . suffix . id } "
6
10
error_message = " Invalid Stop lambda name"
Original file line number Diff line number Diff line change
1
+ variable "test_mode" {
2
+ description = " Whether to run in test mode"
3
+ type = bool
4
+ default = false
5
+ }
You can’t perform that action at this time.
0 commit comments