forked from schubergphilis/terraform-aws-mcaf-workspace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
228 lines (193 loc) · 5.83 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
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
variable "name" {
type = string
description = "A name for the Terraform workspace"
}
variable "region" {
type = string
default = null
description = "The default region of the account"
}
variable "agent_pool_id" {
type = string
default = null
description = "Agent pool ID, requires \"execution_mode\" to be set to agent"
}
variable "agent_role_arn" {
type = string
default = null
description = "IAM role ARN used by Terraform Cloud Agent to assume role in the created account"
}
variable "auth_method" {
type = string
default = "iam_user"
description = "Configures how the workspace authenticates with the AWS account (can be iam_role or iam_user)"
validation {
condition = lower(var.auth_method) == "iam_role" || lower(var.auth_method) == "iam_user"
error_message = "The auth_method value must be either \"iam_role\" or \"iam_user\"."
}
}
variable "auto_apply" {
type = bool
default = false
description = "Whether to automatically apply changes when a Terraform plan is successful"
}
variable "branch" {
type = string
default = "main"
description = "The git branch to trigger the TFE workspace for"
}
variable "clear_text_env_variables" {
type = map(string)
default = {}
description = "An optional map with clear text environment variables"
}
variable "clear_text_hcl_variables" {
type = map(string)
default = {}
description = "An optional map with clear text HCL Terraform variables"
}
variable "clear_text_terraform_variables" {
type = map(string)
default = {}
description = "An optional map with clear text Terraform variables"
}
variable "execution_mode" {
type = string
default = "remote"
description = "Which execution mode to use"
}
variable "file_triggers_enabled" {
type = bool
default = true
description = "Whether to filter runs based on the changed files in a VCS push"
}
variable "global_remote_state" {
type = bool
default = null
description = "Allow all workspaces in the organization to read the state of this workspace"
}
variable "oauth_token_id" {
type = string
description = "The OAuth token ID of the VCS provider"
}
variable "path" {
type = string
default = null
description = "Path in which to create the iam_role or iam_user"
}
variable "policy" {
type = string
default = null
description = "The policy to attach to the pipeline role or user"
}
variable "remote_state_consumer_ids" {
type = set(string)
default = null
description = "A set of workspace IDs set as explicit remote state consumers for this workspace"
}
variable "permissions_boundary_arn" {
type = string
default = null
description = "ARN of the policy that is used to set the permissions boundary for the IAM role or IAM user."
}
variable "policy_arns" {
type = set(string)
default = []
description = "A set of policy ARNs to attach to the pipeline user"
}
variable "repository_identifier" {
type = string
default = null
description = "The repository identifier to connect the workspace to"
}
variable "role_name" {
type = string
default = null
description = "The IAM role name for a new pipeline user"
}
variable "sensitive_env_variables" {
type = map(string)
default = {}
description = "An optional map with sensitive environment variables"
}
variable "sensitive_terraform_variables" {
type = map(string)
default = {}
description = "An optional map with sensitive Terraform variables"
}
variable "sensitive_hcl_variables" {
type = map(object({
sensitive = string
}))
default = {}
description = "An optional map with sensitive HCL Terraform variables"
}
variable "slack_notification_triggers" {
type = list(string)
default = [
"run:created",
"run:planning",
"run:needs_attention",
"run:applying",
"run:completed",
"run:errored"
]
description = "The triggers to send to Slack"
}
variable "slack_notification_url" {
type = string
default = null
description = "The Slack Webhook URL to send notification to"
}
variable "ssh_key_id" {
type = string
default = null
description = "The SSH key ID to assign to the workspace"
}
variable "team_access" {
type = map(object({
access = optional(string, null),
permissions = optional(object({
run_tasks = bool
runs = string
sentinel_mocks = string
state_versions = string
variables = string
workspace_locking = bool
}), null)
}))
default = {}
description = "Map of team names and either type of fixed access or custom permissions to assign"
validation {
condition = alltrue([for o in var.team_access : !(o.access != null && o.permissions != null)])
error_message = "Cannot use \"access\" and \"permissions\" keys together when specifying a team's access."
}
}
variable "terraform_version" {
type = string
default = "latest"
description = "The version of Terraform to use for this workspace"
}
variable "terraform_organization" {
type = string
description = "The Terraform Enterprise organization to create the workspace in"
}
variable "trigger_prefixes" {
type = list(string)
default = ["modules"]
description = "List of repository-root-relative paths which should be tracked for changes"
}
variable "username" {
type = string
default = null
description = "The username for a new pipeline user"
}
variable "working_directory" {
type = string
default = "terraform"
description = "A relative path that Terraform will execute within"
}
variable "tags" {
type = map(string)
description = "A mapping of tags to assign to resource"
}