Skip to content

Commit

Permalink
Add timezone var
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmacedot committed Aug 26, 2024
1 parent 6bf9d59 commit f0aabfb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions _variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,10 @@ variable "enable_schedule" {
description = "Enables schedule to shut down and start up instances outside business hours."
}

variable "schedules_stop" {

}

variable "schedule_cron_start" {
type = string
default = ""
Expand Down Expand Up @@ -511,3 +515,7 @@ variable "task_role_policies" {
description = "Custom policies to be added on the task role."
}

variable "timezone" {
type = string
default = "UTC"
}
4 changes: 2 additions & 2 deletions appautoscaling.tf
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ resource "aws_appautoscaling_scheduled_action" "scale_service_out" {
resource_id = aws_appautoscaling_target.ecs[0].resource_id
scalable_dimension = aws_appautoscaling_target.ecs[0].scalable_dimension
schedule = var.schedule_cron_stop
timezone = "UTC"
timezone = var.timezone

scalable_target_action {
min_capacity = 0
Expand All @@ -99,7 +99,7 @@ resource "aws_appautoscaling_scheduled_action" "scale_service_in" {
resource_id = aws_appautoscaling_target.ecs[0].resource_id
scalable_dimension = aws_appautoscaling_target.ecs[0].scalable_dimension
schedule = var.schedule_cron_start
timezone = "UTC"
timezone = var.timezone

scalable_target_action {
min_capacity = var.autoscaling_min
Expand Down

0 comments on commit f0aabfb

Please sign in to comment.