mirror of
https://github.com/rssnyder/harness-autostopping
synced 2026-06-30 16:30:40 -05:00
No description
- HCL 100%
| .gitignore | ||
| .terraform.lock.hcl | ||
| alb.tf | ||
| asg.tf | ||
| ec2.tf | ||
| ecs.tf | ||
| LICENSE | ||
| main.tf | ||
| output.tf | ||
| provider.tf | ||
| README.md | ||
| schedule.tf | ||
| variable.tf | ||
harness-autostopping
this module will create autostopping components for the target resource type, any combination of traffic, schedule, or none
for traffic based, you will pass your alb information
for schedule based, you will pass a list of objects that describe your schedule:
[{
name = "mySched"
type = "uptime"
time_zone = "America/Chicago"
spec = {
days = ["MON", "TUE", "WED", "THU", "FRI"]
start_time = "08:00"
end_time = "17:00"
}
}]
the above is a monday through friday 8-5 schedule
asg
autostopping for aws autoscaling groups
required inputs
- asg_name
- idle_time_mins
- harness_cloud_connector_id
- region
optional inputs
schedules
- autostopping_schedules: list of uptime schedules repeat windows
traffic
- vpc_id: vpc id
- alb_arn: id of the alb to import to harness
- listener_arn: listener arn
- tg_arn: target group arn
ec2
autostopping for aws ec2 instances
required inputs
- ec2_id
- idle_time_mins
- harness_cloud_connector_id
- region
optional inputs
schedules
- autostopping_schedules: list of uptime schedules repeat windows
traffic
- vpc_id: vpc id
- alb_arn: id of the alb to import to harness
- listener_arn: listener arn
- tg_arn: target group arn
ecs
autostopping for aws ecs services
required inputs
- ecs_service_name
- ecs_cluster_name
- idle_time_mins
- harness_cloud_connector_id
- region
optional inputs
schedules
- autostopping_schedules: list of uptime schedules repeat windows
traffic
- vpc_id: vpc id
- alb_arn: id of the alb to import to harness
module spec
Requirements
| Name | Version |
|---|---|
| aws | >= 6 |
| harness | >= 0.39.1 |
Providers
| Name | Version |
|---|---|
| aws | 6.26.0 |
| harness | 0.39.4 |
Modules
No modules.
Resources
| Name | Type |
|---|---|
| harness_autostopping_aws_alb.this | resource |
| harness_autostopping_rule_ecs.this | resource |
| harness_autostopping_rule_scale_group.this | resource |
| harness_autostopping_rule_vm.this | resource |
| harness_autostopping_schedule.this | resource |
| aws_autoscaling_group.this | data source |
| aws_ecs_cluster.this | data source |
| aws_ecs_service.this | data source |
| aws_instance.this | data source |
| aws_lb.this | data source |
| aws_lb_listener.this | data source |
| aws_lb_target_group.this | data source |
Inputs
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| alb_arn | id of the alb to import to harness; set to enable alb autostopping | string |
null |
no |
| asg_name | asg id | string |
null |
no |
| autostopping_schedules | Optional list of schedule repeat windows. If null, no Harness autostopping schedule will be created. | list(object({ |
null |
no |
| ec2_id | ec2 id | string |
null |
no |
| ecs_cluster_name | ecs cluster name; required if ecs_service_name set | string |
null |
no |
| ecs_service_name | ecs service name | string |
null |
no |
| harness_cloud_connector_id | harness cloud connector id | string |
n/a | yes |
| idle_time_mins | idle time | number |
n/a | yes |
| listener_arn | listener arn; required if alb_arn set, unless using ecs | string |
null |
no |
| name | name for this alb/rule | string |
n/a | yes |
| region | cloud region | string |
n/a | yes |
| tg_arn | target group arn; required if alb_arn set, unless using ecs | string |
null |
no |
| vpc_id | vpc id; required if alb_arn set | string |
null |
no |
Outputs
| Name | Description |
|---|---|
| autostopping_rule_id | n/a |
| autostopping_schedule_ids | n/a |