Commit 6a3a79a 1 parent 5cd34ff commit 6a3a79a Copy full SHA for 6a3a79a
File tree 1 file changed +31
-0
lines changed
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,37 @@ data "aws_iam_policy_document" "ecr_cross_account_read" {
155
155
identifiers = [" lambda.amazonaws.com" ]
156
156
}
157
157
}
158
+ }
159
+
160
+ #
161
+ # Holds the Forms app images used by the Rainbow deployment service
162
+ #
163
+ resource "aws_ecr_repository" "forms_app_legacy_repository" {
164
+ name = " forms_app_legacy"
165
+ image_tag_mutability = " MUTABLE"
158
166
167
+ image_scanning_configuration {
168
+ scan_on_push = true
169
+ }
159
170
}
160
171
172
+ resource "aws_ecr_lifecycle_policy" "forms_app_legacy_policy" {
173
+ repository = aws_ecr_repository. forms_app_legacy_repository . name
174
+ policy = jsonencode ({
175
+ rules = [{
176
+ rulePriority = 1
177
+ description = " Keep last 30 images"
178
+
179
+ selection = {
180
+ tagStatus = " tagged"
181
+ tagPrefixList = [" v" ]
182
+ countType = " imageCountMoreThan"
183
+ countNumber = 30
184
+ }
185
+
186
+ action = {
187
+ type = " expire"
188
+ }
189
+ }]
190
+ })
191
+ }
You can’t perform that action at this time.
0 commit comments