-
Notifications
You must be signed in to change notification settings - Fork 7
/
variables.tf
101 lines (84 loc) · 3.56 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
# ----------------------------------------------------------------------------------------------------------------------
# REQUIRED PARAMETERS
# These variables must be set when using this module.
# ----------------------------------------------------------------------------------------------------------------------
variable "policy" {
type = string
description = "(Required, conflicts with policy_statements) The policy document. This is a JSON formatted string. For more information about building AWS IAM policy documents with Terraform, see the AWS IAM Policy Document Guide "
default = null
}
variable "policy_statements" {
type = any
description = "(Required, conflicts with policy) A list of policy statements to build the policy document from."
default = []
}
# ----------------------------------------------------------------------------------------------------------------------
# OPTIONAL PARAMETERS
# These variables have defaults, but may be overridden.
# ----------------------------------------------------------------------------------------------------------------------
variable "description" {
type = string
description = "(Optional, Forces new resource) Description of the IAM policy."
default = null
}
variable "name" {
type = string
description = "(Optional, Forces new resource) The name of the policy. If omitted, Terraform will assign a random, unique name."
default = null
}
variable "name_prefix" {
type = string
description = "(Optional, Forces new resource) Creates a unique name beginning with the specified prefix. Conflicts with name."
default = null
}
variable "path" {
type = string
description = "(Optional, default /) Path in which to create the policy. See IAM Identifiers for more information."
default = "/"
}
# policy_attachment
variable "attachment_name" {
type = string
description = "(Optional) - The name of the attachment. Default is name of the policy."
default = null
}
variable "users" {
type = list(string)
description = "(Optional) - The user(s) the policy should be applied to. Default is null."
default = null
}
variable "roles" {
type = list(string)
description = "(Optional) - The role(s) the policy should be applied to. Default is null."
default = null
}
variable "groups" {
type = list(string)
description = "(Optional) - The group(s) the policy should be applied to. Default is null."
default = null
}
variable "tags" {
type = map(string)
description = "(Optional) A map of tags that will be applied to the created IAM policy."
default = {}
}
# ------------------------------------------------------------------------------
# MODULE CONFIGURATION PARAMETERS
# These variables are used to configure the module.
# See https://medium.com/mineiros/the-ultimate-guide-on-how-to-write-terraform-modules-part-1-81f86d31f024
# ------------------------------------------------------------------------------
variable "module_enabled" {
type = bool
description = "(Optional) Whether to create resources within the module or not. Default is true."
default = true
}
variable "module_tags" {
type = map(string)
description = "(Optional) A map of tags that will be applied to all created resources that accept tags. Tags defined with 'module_tags' can be overwritten by resource-specific tags."
default = {}
}
variable "module_depends_on" {
type = any
description = "(Optional) A list of external resources the module depends_on."
default = []
}