-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
86 lines (72 loc) · 2.33 KB
/
variables.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Terraform variables file
# Set cloudwatch events for shutingdown instances
# trigger lambda functuon every night at 22h00 from Monday to Friday
# cf doc : https://docs.aws.amazon.com/lambda/latest/dg/tutorial-scheduled-events-schedule-expressions.html
variable "cloudwatch_schedule_expression" {
description = "Define the aws cloudwatch event rule schedule expression"
type = string
default = "cron(0 22 ? * MON-FRI *)"
}
variable "name" {
description = "Define name to use for lambda function, cloudwatch event and iam role"
type = string
}
variable "custom_iam_role_arn" {
description = "Custom IAM role arn for the scheduling lambda"
type = string
default = null
}
variable "kms_key_arn" {
description = "The ARN for the KMS encryption key. If this configuration is not provided when environment variables are in use, AWS Lambda uses a default service key."
type = string
default = null
}
variable "aws_regions" {
description = "A list of one or more aws regions where the lambda will be apply, default use the current region"
type = list(string)
default = null
}
variable "schedule_action" {
description = "Define schedule action to apply on resources, accepted value are 'stop or 'start"
type = string
default = "stop"
}
variable "resources_tag" {
# This variable has been renamed to "scheduler_tag"
description = "DEPRECATED, use scheduler_tag variable instead"
type = map(string)
default = null
}
variable "scheduler_tag" {
description = "Set the tag to use for identify aws resources to stop or start"
type = map(string)
default = {
"key" = "tostop"
"value" = "true"
}
}
variable "autoscaling_schedule" {
description = "Enable scheduling on autoscaling resources"
type = any
default = false
}
variable "ec2_schedule" {
description = "Enable scheduling on ec2 resources"
type = any
default = false
}
variable "rds_schedule" {
description = "Enable scheduling on rds resources"
type = any
default = false
}
variable "cloudwatch_alarm_schedule" {
description = "Enable scheduleding on cloudwatch alarm resources"
type = any
default = false
}
variable "tags" {
description = "Custom tags on aws resources"
type = map(any)
default = null
}