-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
72 lines (62 loc) · 1.99 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
variable "name" {
description = "A name used to create resources in module"
type = string
validation {
condition = length(var.name) > 1
error_message = "This variable should have more than 1 characters."
}
}
variable "schedules" {
type = list(object({
name = string
start = string
stop = string
tag_key = string
tag_value = string
}))
description = "List of map containing, the following keys: name (for jobs name), start (cron for the start schedule), stop (cron for stop schedule), tag_key and tag_value (target recources)"
}
variable "tags" {
default = {}
description = "Custom Resource tags"
type = map(string)
}
variable "lambda_timeout" {
default = 120
description = "Amount of time your Lambda Function has to run in seconds."
type = number
validation {
condition = var.lambda_timeout < 900
error_message = "AWS Lambda Quota limits lambda execution to 15 min."
}
}
variable "rds_schedule" {
default = true
description = "Run the scheduler on RDS."
type = bool
}
variable "asg_schedule" {
default = true
description = "Run the scheduler on AutoScalingGroup."
type = bool
}
variable "ec2_schedule" {
default = false
description = "Run the scheduler on EC2 instances. (only allows downscaling)"
type = bool
}
variable "aws_regions" {
default = null
description = "List of AWS region where the scheduler will be applied. By default target the current region."
type = list(string)
}
variable "custom_iam_lambda_role" {
default = false
description = "Use a custom role used for the lambda. Useful if you cannot create IAM ressource directly with your AWS profile, or to share a role between several resources."
type = bool
}
variable "custom_iam_lambda_role_arn" {
default = null
description = "Custom role arn used for the lambda. Used only if custom_iam_lambda_role is set to true."
type = string
}