-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
149 lines (128 loc) · 2.84 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
variable "prefix" {}
variable "common_tags" {
type = map(string)
}
##########################
# API LAMBDA VARIABLES
##########################
variable "description" {
default = "Codeless lambda so code CI CD can be managed externally"
}
variable "runtime" {
default = "python3.7"
}
variable "handler" {
default = "app.runtime.lambda.main.handler"
}
variable "memory_size" {
default = 512
}
variable "envs" {
type = map(string)
}
variable "policy_json" {
type = string
default = null
}
variable "logs_retention_in_days" {
default = 1
}
variable "jwt_authorization_groups_attr_name" {
default = "groups"
}
##########################
# API GATEWAY VARIABLES
##########################
variable "stage_name" {
type = string
default = "this"
}
variable "access_logs_retention_in_days" {
type = number
default = 3
}
# JWT
variable "jwt_authorizer" {
description = "JWT Authorizer Issuer/Audience (User Pool Endpoint and Client ID in case of Cognito)"
type = object({
issuer = string
audience = list(string)
})
}
variable "routes_definitions" {
default = {
health_check = {
operation_name = "Service Health Check"
route_key = "GET /v1/manage/hc"
}
token = {
operation_name = "Get authorization token"
route_key = "POST /v1/auth/token"
}
whoami = {
operation_name = "Get user claims"
route_key = "GET /v1/users/whoami"
# Authorization
api_key_required = false
authorization_type = "JWT"
authorization_scopes = []
}
site_map = {
operation_name = "Get endpoints list"
route_key = "GET /v1/admin/endpoints"
# Authorization
api_key_required = false
authorization_type = "JWT"
authorization_scopes = []
}
swagger_specification = {
operation_name = "Swagger Specification"
route_key = "GET /v1/swagger.json"
}
swagger_ui = {
operation_name = "Swagger UI"
route_key = "GET /v1/docs"
}
}
}
##########################
# API CI/CD VARIABLES
##########################
# Github
# --------
variable "github" {
description = "A map of strings with GitHub specific variables"
type = object({
owner = string
connection_arn = string
webhook_secret = string
})
}
variable "pre_release" {
default = true
}
variable "github_repository" {
type = object({
name = string
branch = string
})
}
# S3 Buckets
# ----------
variable "s3_artifacts" {
type = object({
bucket = string
arn = string
})
}
variable "app_src_path" {}
variable "packages_descriptor_path" {}
# Notification
# ------------
variable "ci_notifications_slack_channels" {
description = "Slack channel name for notifying ci pipeline info/alerts"
type = object({
info = string
alert = string
})
}