generated from plus3it/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvariables.tf
31 lines (28 loc) · 918 Bytes
/
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
variable "resource_group" {
description = "Object of configuration attributes for the resource group"
type = object({
name = string
description = optional(string)
resource_query = object({
type = optional(string, "TAG_FILTERS_1_0")
query = object({
ResourceTypeFilters = optional(list(string), ["AWS::AllSupported"])
TagFilters = list(object({
Key = string,
Values = list(string)
}))
})
})
})
validation {
condition = lower(var.resource_group.name) != "aws"
error_message = "The resource_group.name must not begin with aws or AWS"
}
validation {
condition = contains(
["TAG_FILTERS_1_0", "CLOUDFORMATION_STACK_1_0"],
var.resource_group.resource_query.type
)
error_message = "The resource_group.resource_query.type must be one of: TAG_FILTERS_1_O, CLOUDFORMATION_STACK_1_0"
}
}