forked from cloudposse/terraform-aws-amplify-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
188 lines (169 loc) · 5.87 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
variable "description" {
type = string
description = "The description for the Amplify app"
default = null
}
variable "repository" {
type = string
description = "The repository for the Amplify app"
default = null
}
variable "platform" {
type = string
description = "The platform or framework for the Amplify app"
default = "WEB"
}
variable "access_token" {
type = string
description = <<-EOT
The personal access token for a third-party source control system for the Amplify app.
The personal access token is used to create a webhook and a read-only deploy key. The token is not stored.
Make sure that the account where the token is created has access to the repository.
EOT
default = null
sensitive = true
}
variable "oauth_token" {
type = string
description = <<-EOT
The OAuth token for a third-party source control system for the Amplify app.
The OAuth token is used to create a webhook and a read-only deploy key.
The OAuth token is not stored.
EOT
default = null
sensitive = true
}
variable "auto_branch_creation_config" {
type = object({
basic_auth_credentials = optional(string)
build_spec = optional(string)
enable_auto_build = optional(bool)
enable_basic_auth = optional(bool)
enable_performance_mode = optional(bool)
enable_pull_request_preview = optional(bool)
environment_variables = optional(map(string))
framework = optional(string)
pull_request_environment_name = optional(string)
stage = optional(string)
})
description = "The automated branch creation configuration for the Amplify app"
default = null
}
variable "auto_branch_creation_patterns" {
type = list(string)
description = "The automated branch creation glob patterns for the Amplify app"
default = []
}
variable "basic_auth_credentials" {
type = string
description = "The credentials for basic authorization for the Amplify app"
default = null
}
variable "build_spec" {
type = string
description = <<-EOT
The [build specification](https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html) (build spec) for the Amplify app.
If not provided then it will use the `amplify.yml` at the root of your project / branch.
EOT
default = null
}
variable "enable_auto_branch_creation" {
type = bool
description = "Enables automated branch creation for the Amplify app"
default = false
}
variable "enable_basic_auth" {
type = bool
description = <<-EOT
Enables basic authorization for the Amplify app.
This will apply to all branches that are part of this app.
EOT
default = false
}
variable "enable_branch_auto_build" {
type = bool
description = "Enables auto-building of branches for the Amplify App"
default = true
}
variable "enable_branch_auto_deletion" {
type = bool
description = "Automatically disconnects a branch in the Amplify Console when you delete a branch from your Git repository"
default = false
}
variable "environment_variables" {
type = map(string)
description = "The environment variables for the Amplify app"
default = {}
}
variable "iam_service_role_arn" {
type = list(string)
description = <<-EOT
The AWS Identity and Access Management (IAM) service role for the Amplify app.
If not provided, a new role will be created if the variable `iam_service_role_enabled` is set to `true`.
EOT
default = []
nullable = false
}
variable "iam_service_role_enabled" {
type = bool
description = "Flag to create the IAM service role for the Amplify app"
default = false
nullable = false
}
variable "iam_service_role_actions" {
type = list(string)
description = <<-EOT
List of IAM policy actions for the AWS Identity and Access Management (IAM) service role for the Amplify app.
If not provided, the default set of actions will be used for the role if the variable `iam_service_role_enabled` is set to `true`.
EOT
default = []
nullable = false
}
variable "custom_rules" {
type = list(object({
condition = optional(string)
source = string
status = optional(string)
target = string
}))
description = "The custom rules to apply to the Amplify App"
default = []
nullable = false
}
variable "environments" {
type = map(object({
branch_name = optional(string)
backend_enabled = optional(bool, false)
environment_name = optional(string)
deployment_artifacts = optional(string)
stack_name = optional(string)
display_name = optional(string)
description = optional(string)
enable_auto_build = optional(bool)
enable_basic_auth = optional(bool)
enable_notification = optional(bool)
enable_performance_mode = optional(bool)
enable_pull_request_preview = optional(bool)
environment_variables = optional(map(string))
framework = optional(string)
pull_request_environment_name = optional(string)
stage = optional(string)
ttl = optional(number)
webhook_enabled = optional(bool, false)
}))
description = "The configuration of the environments for the Amplify App"
default = {}
nullable = false
}
variable "domains" {
type = map(object({
enable_auto_sub_domain = optional(bool, false)
wait_for_verification = optional(bool, false)
sub_domain = list(object({
branch_name = string
prefix = string
}))
}))
description = "Amplify custom domain configurations"
default = {}
}