-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
118 lines (106 loc) · 3.24 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
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
variable "context" {
type = object({
attributes = list(string)
dns_namespace = string
environment = string
instance = string
instance_short = string
namespace = string
region = string
region_short = string
role = string
role_short = string
project = string
tags = map(string)
})
description = "Shared Context from Ben's terraform-null-context"
}
variable "backend_user" {
type = object({
create = bool
name = optional(string) # req, if create is false or invalid
force_destroy = optional(bool) # opt
pgp_key = optional(string) # req if create is true or invalid
})
default = {
create = false
}
nullable = false
# TODO Validation
}
variable "backend_role" {
type = object({
create = bool
arn = optional(string) # opt, if create is false
extra_assume_statements = optional(list(object({
actions = list(string)
principals = object({
type = string
identifiers = list(string)
})
conditions = optional(list(object({
test = string
variable = string
values = list(string)
})))
})))
dynamodb_policy = optional(object({
create = bool
policy_arn = optional(string) # req, if create is false or invalid
table_arn = optional(string) # req, if create is true or invalid
kms_key = optional(string) # opt, if create is true or invalid
}), { create = false })
s3_policy = optional(object({
create = bool
policy_arn = optional(string) # req, if create is false or invalid
bucket_arn = optional(string) # req, if create is true or invalid
kms_key = optional(string) # opt, if create is true or invalid
}), { create = false })
})
default = {
create = false
}
nullable = false
# TODO Validation
}
variable "apply_user" {
type = object({
create = bool
name = optional(string) # req, if create is false or invalid
force_destroy = optional(bool) # opt
pgp_key = optional(string) # req if create is true or invalid
})
}
variable "apply_role" {
type = object({
create = bool
arn = optional(string) # req, if create is false
extra_assume_statements = optional(list(object({
actions = list(string)
principals = object({
type = string
identifiers = list(string)
})
conditions = optional(list(object({
test = string
variable = string
values = list(string)
})))
})))
budgets = optional(bool, false)
dynamodb = optional(bool, false)
ec2_account = optional(bool, false)
ec2_networking = optional(bool, false)
ec2_tags = optional(bool, false)
ecs = optional(bool, false)
efs = optional(bool, false)
iam = optional(bool, false)
kms = optional(bool, false)
lambda = optional(bool, false)
logs = optional(bool, false)
route53 = optional(bool, false)
s3 = optional(bool, false)
sns = optional(bool, false)
ssm_params = optional(bool, false)
})
}