-
Notifications
You must be signed in to change notification settings - Fork 2
/
ecr.tf
152 lines (142 loc) · 3.46 KB
/
ecr.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
locals {
name_prefix = "xquare"
name_prefix_v2 = "xquare-v2"
name_prefix_v3 = "xquare-v3"
ecr_names = [
# ECR_REPOSITORY_NAME
"sillok-fe-fe-prod",
"eeats-be-prod",
"equus-user-be-prod",
"whopper-be-prod",
"founderz-be-prod",
"hackton-jeong-be-prod",
"equus-application-be-prod",
"testtest-be-stag",
"repo-user-fe-prod",
"repo-admin-fe-prod",
"repo-main-fe-prod",
"pick-teacher-fe-prod",
"pick-admin-fe-prod",
"envoy-middlware-be-prod",
"scul-main-fe-prod",
"xquare-infra-be-prod",
"xquare-infra-fe-fe-prod",
"kht-be-prod",
"pick-admin-fe-stag",
"pick-teacher-fe-stag",
"pick-core-be-prod",
"pick-core-be-stag",
"scul-be-prod",
"appjam-singtory-be-prod",
"appjam-be-prod",
"suno-api-be-prod",
"pick-web-teacher-fe-prod",
"new-pick-be-stag",
"xquare-infra-frontend-fe-prod",
"daedongyeojido-fe-fe-prod",
"xquare-infra-backend-be-prod",
"pick-web-admin-fe-prod",
"dsm-login-be-prod",
"xquare-infra-fe-prod",
"dsm-ouath-be-prod",
"xquare-event-listener-prod",
"xquare-backoffice-be-prod",
"nudia-be-prod",
"maeumgagym-admin-fe-stag",
"merge-backend-be-prod",
"merge-user-fe-prod",
"maeumgagym-user-fe-stag",
"new-pick-be-prod",
"daedongyeojido-fe-prod",
"dashboard-tsdata-bridge-be-prod",
"test-deploy-be-stag",
"maeumgagym-be-prod",
"dms-be-stag",
"daedong-be-prod",
"dms-be-prod",
"afterschool-be-stag",
"maeumgagym-frontend-fe-stag",
"juso-be-prod",
"test-be-prod",
"maeumgagym-be-stag",
"dutiful-be-stag",
"aster-frontend-fe-prod",
"svap-be-stag",
"svap-be-prod",
"aster-be-stag",
"aster-be-prod",
"entry-config-server-be-stag",
"project-manager-front-fe-prod",
"mukgen-be-stag",
"xbridge-test-fe-prod",
"repo-be-prod",
"point-be-prod",
"dormitory-admin-fe-prod",
"authority-be-prod",
"user-be-prod",
"feed-be-stag",
"project-secret-manager-be-prod",
"pick-be-prod",
"timetable-be-prod",
"schedule-be-prod",
"git-be-prod",
"envoy-middleware-be-prod",
"apply-fe-prod",
"feed-fe-prod",
"school-meal-fe-prod",
"oauth-be-prod",
"cloud-config-be-prod",
"pick-be-stag",
"meal-be-prod",
"git-be-stag",
"notification-be-stag",
"report-be-stag",
"schedule-be-stag",
"authority-be-stag",
"timetable-be-stag",
"user-be-stag",
"point-be-stag",
"meal-be-stag",
"feed-be-prod",
"attachment-be-stag",
"application-be-prod",
"application-be-stag",
]
region = "ap-northeast-2"
}
locals {
stag_ecr_names = toset([
for name in local.ecr_names : name if endswith(name, "-stag")
])
stag_tag_prefix = "stag-"
stag_tag_limit = 5
prod_ecr_names = toset([
for name in local.ecr_names : name if endswith(name, "-prod")
])
prod_tag_prefix = "prod-"
prod_tag_limit = 5
}
module "stag_ecr" {
source = "./modules/ecr"
for_each = local.stag_ecr_names
name = each.value
image_limit = local.stag_tag_limit
tag_prefix = local.stag_tag_prefix
}
module "prod_ecr" {
source = "./modules/ecr"
for_each = local.prod_ecr_names
name = each.value
image_limit = local.prod_tag_limit
tag_prefix = local.prod_tag_prefix
}
output "stag_ecr_url" {
value = [
for v in module.stag_ecr : v.ecr_repository_url
]
}
output "prod_ecr_url" {
value = [
for v in module.prod_ecr : v.ecr_repository_url
]
}