-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathautoscaler.tf
64 lines (53 loc) · 2.07 KB
/
autoscaler.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
module "autoscaler" {
source = "github.com/spacelift-io/ec2-workerpool-autoscaler//iac"
for_each = var.enable_autoscaling ? toset(["ENABLED"]) : toset([])
autoscaling_group_arn = var.autoscaling_group_arn
autoscaler_version = var.autoscaler_version
spacelift_api_key_id = var.spacelift_api_key_id
spacelift_api_key_secret = var.spacelift_api_key_secret
spacelift_api_key_endpoint = var.spacelift_api_key_endpoint
worker_pool_id = var.worker_pool_id
autoscaler_architecture = var.autoscaler_architecture
autoscaling_timeout = var.autoscaling_timeout
autoscaling_max_create = var.autoscaling_max_create
autoscaling_max_terminate = var.autoscaling_max_terminate
schedule_expression = var.schedule_expression
base_name = var.base_name
region = var.region
autoscaler_s3_package = var.autoscaler_s3_package
subnet_ids = var.vpc_subnets
security_group_ids = var.security_groups
depends_on = [module.asg]
}
moved {
from = aws_ssm_parameter.spacelift_api_key_secret[0]
to = module.autoscaler["ENABLED"].aws_ssm_parameter.spacelift_api_key_secret
}
moved {
from = null_resource.download[0]
to = module.autoscaler["ENABLED"].null_resource.download
}
moved {
from = aws_lambda_function.autoscaler[0]
to = module.autoscaler["ENABLED"].aws_lambda_function.autoscaler
}
moved {
from = aws_cloudwatch_event_rule.scheduling[0]
to = module.autoscaler["ENABLED"].aws_cloudwatch_event_rule.scheduling
}
moved {
from = aws_cloudwatch_event_target.scheduling[0]
to = module.autoscaler["ENABLED"].aws_cloudwatch_event_target.scheduling
}
moved {
from = aws_lambda_permission.allow_cloudwatch_to_call_lambda[0]
to = module.autoscaler["ENABLED"].aws_lambda_permission.allow_cloudwatch_to_call_lambda
}
moved {
from = aws_cloudwatch_log_group.log_group[0]
to = module.autoscaler["ENABLED"].aws_cloudwatch_log_group.log_group
}
moved {
from = aws_iam_role.autoscaler[0]
to = module.autoscaler["ENABLED"].aws_iam_role.autoscaler
}