generated from pbs/terraform-aws-template-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
optional.tf
144 lines (124 loc) · 4.37 KB
/
optional.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
variable "name" {
description = "Name of the synthetics module. If null, will default to product."
type = string
default = null
}
variable "schedule" {
description = "Schedule for how often the canary is to run and when these test runs are to stop."
type = object({
expression = string
duration_in_seconds = optional(number)
})
default = {
expression = "rate(5 minutes)"
}
}
variable "runtime_version" {
description = "Specifies the runtime version to use for the canary. For a list of valid runtime versions, see Canary Runtime Versions."
type = string
default = "syn-nodejs-puppeteer-7.0"
}
variable "execution_role_arn" {
description = "ARN of the IAM role to be used to run the canary."
type = string
default = null
}
variable "handler" {
description = "Entry point to use for the source code when running the canary. This value must end with the string `.handler`."
type = string
default = "canary.handler"
validation {
condition = endswith(var.handler, ".handler")
error_message = "Handler must end with `.handler`."
}
}
variable "delete_lambda" {
description = "Specifies whether to also delete the Lambda functions and layers used by this canary."
type = bool
default = false
}
variable "vpc_config" {
description = "Specifies the VPC settings of the canary."
type = object({
subnet_ids = list(string)
security_group_ids = list(string)
})
default = null
}
variable "failure_retention_period" {
description = "Number of days to retain data about failed runs of this canary."
type = number
default = 31
validation {
condition = var.failure_retention_period >= 1 && var.failure_retention_period <= 455
error_message = "Failure retention period must be between 1 and 455 days."
}
}
variable "run_config" {
description = "Configuration block for individual canary runs."
type = object({
timeout_in_seconds = optional(number)
memory_in_mb = optional(number)
active_tracing = optional(bool)
environment_variables = optional(map(string))
})
default = null
}
variable "canary_script_s3_location" {
description = "Location in Amazon S3 where Synthetics stores the canary script for a canary. Conflicts with `zip_file`."
type = object({
bucket = optional(string)
key = optional(string)
version = optional(string)
})
default = {}
}
variable "zip_file" {
description = "ZIP file that contains the script, if you input your canary script directly into the canary instead of referring to an S3 location. It can be up to 225KB. Conflicts with `canary_script_s3_location`."
type = string
default = null
}
variable "start_canary" {
description = "Specifies whether this canary is to run after it is created."
type = bool
default = true
}
variable "success_retention_period" {
description = "Number of days to retain data about successful runs of this canary. The valid range is 1 to 455 days."
type = number
default = 31
validation {
condition = var.success_retention_period >= 1 && var.success_retention_period <= 455
error_message = "Success retention period must be between 1 and 455 days."
}
}
variable "artifact_config" {
description = "Configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3."
type = object({
s3_encryption = optional(object({
encryption_mode = optional(string)
kms_key_arn = optional(string)
}))
})
default = null
}
variable "force_destroy" {
description = "Specifies whether to force destroy the bucket containing the canary artifacts. This is required when the bucket contains objects. The default value is `false`."
type = bool
default = false
}
variable "snapshot_bucket_name" {
description = "Name of the bucket to store snapshots in. If null, will default to name."
type = string
default = null
}
variable "execution_role_name" {
description = "Name of the execution role created by this module, if one is created. If null, will default to name."
type = string
default = null
}
variable "policy_json" {
description = "Policy JSON. If null, default policy granting S3, logging, and XRay will be attached"
type = string
default = null
}