@@ -25,6 +25,7 @@ func TestAccAWSInstanceProfilePolicy_basic(t *testing.T) {
25
25
"arn:aws:ecr:*:*:repository/*/airflow" ,
26
26
"arn:aws:ecr:*:*:repository/*/git" ,
27
27
"arn:aws:ecr:*:*:repository/*/testconnector" ,
28
+ "arn:aws:ecr:*:*:repository/*/flyingduck" ,
28
29
}
29
30
var allowPullImagesFromHopsworkAiResource = []string {
30
31
"arn:aws:ecr:*:822623301872:repository/filebeat" ,
@@ -33,6 +34,7 @@ func TestAccAWSInstanceProfilePolicy_basic(t *testing.T) {
33
34
"arn:aws:ecr:*:822623301872:repository/airflow" ,
34
35
"arn:aws:ecr:*:822623301872:repository/git" ,
35
36
"arn:aws:ecr:*:822623301872:repository/testconnector" ,
37
+ "arn:aws:ecr:*:822623301872:repository/flyingduck" ,
36
38
}
37
39
policy .Statements = append (policy .Statements , awsEKSPermissions (allowDescribeEKSResource )... )
38
40
policy .Statements = append (policy .Statements , awsECRPermissions (allowPullImagesFromHopsworkAiResource , allowPushandPullImagesResource )... )
@@ -68,6 +70,7 @@ func TestAccAWSInstanceProfilePolicy_eks_restriction(t *testing.T) {
68
70
"arn:aws:ecr:*:*:repository/*/airflow" ,
69
71
"arn:aws:ecr:*:*:repository/*/git" ,
70
72
"arn:aws:ecr:*:*:repository/*/testconnector" ,
73
+ "arn:aws:ecr:*:*:repository/*/flyingduck" ,
71
74
}
72
75
var allowPullImagesFromHopsworkAiResource = []string {
73
76
"arn:aws:ecr:*:822623301872:repository/filebeat" ,
@@ -76,6 +79,7 @@ func TestAccAWSInstanceProfilePolicy_eks_restriction(t *testing.T) {
76
79
"arn:aws:ecr:*:822623301872:repository/airflow" ,
77
80
"arn:aws:ecr:*:822623301872:repository/git" ,
78
81
"arn:aws:ecr:*:822623301872:repository/testconnector" ,
82
+ "arn:aws:ecr:*:822623301872:repository/flyingduck" ,
79
83
}
80
84
policy .Statements = append (policy .Statements , awsEKSPermissions (allowDescribeEKSResource )... )
81
85
policy .Statements = append (policy .Statements , awsECRPermissions (allowPullImagesFromHopsworkAiResource , allowPushandPullImagesResource )... )
@@ -111,6 +115,7 @@ func TestAccAWSInstanceProfilePolicy_cluster_id(t *testing.T) {
111
115
"arn:aws:ecr:*:*:repository/cluster_id/airflow" ,
112
116
"arn:aws:ecr:*:*:repository/cluster_id/git" ,
113
117
"arn:aws:ecr:*:*:repository/cluster_id/testconnector" ,
118
+ "arn:aws:ecr:*:*:repository/cluster_id/flyingduck" ,
114
119
}
115
120
var allowPullImagesFromHopsworkAiResource = []string {
116
121
"arn:aws:ecr:*:822623301872:repository/filebeat" ,
@@ -119,6 +124,7 @@ func TestAccAWSInstanceProfilePolicy_cluster_id(t *testing.T) {
119
124
"arn:aws:ecr:*:822623301872:repository/airflow" ,
120
125
"arn:aws:ecr:*:822623301872:repository/git" ,
121
126
"arn:aws:ecr:*:822623301872:repository/testconnector" ,
127
+ "arn:aws:ecr:*:822623301872:repository/flyingduck" ,
122
128
}
123
129
policy .Statements = append (policy .Statements , awsEKSPermissions (allowDescribeEKSResource )... )
124
130
policy .Statements = append (policy .Statements , awsECRPermissions (allowPullImagesFromHopsworkAiResource , allowPushandPullImagesResource )... )
@@ -154,6 +160,7 @@ func TestAccAWSInstanceProfilePolicy_singleBucket(t *testing.T) {
154
160
"arn:aws:ecr:*:*:repository/*/airflow" ,
155
161
"arn:aws:ecr:*:*:repository/*/git" ,
156
162
"arn:aws:ecr:*:*:repository/*/testconnector" ,
163
+ "arn:aws:ecr:*:*:repository/*/flyingduck" ,
157
164
}
158
165
var allowPullImagesFromHopsworkAiResource = []string {
159
166
"arn:aws:ecr:*:822623301872:repository/filebeat" ,
@@ -162,6 +169,7 @@ func TestAccAWSInstanceProfilePolicy_singleBucket(t *testing.T) {
162
169
"arn:aws:ecr:*:822623301872:repository/airflow" ,
163
170
"arn:aws:ecr:*:822623301872:repository/git" ,
164
171
"arn:aws:ecr:*:822623301872:repository/testconnector" ,
172
+ "arn:aws:ecr:*:822623301872:repository/flyingduck" ,
165
173
}
166
174
policy .Statements = append (policy .Statements , awsEKSPermissions (allowDescribeEKSResource )... )
167
175
policy .Statements = append (policy .Statements , awsECRPermissions (allowPullImagesFromHopsworkAiResource , allowPushandPullImagesResource )... )
@@ -220,6 +228,7 @@ func TestAccAWSInstanceProfilePolicy_disableEKS(t *testing.T) {
220
228
"arn:aws:ecr:*:*:repository/*/airflow" ,
221
229
"arn:aws:ecr:*:*:repository/*/git" ,
222
230
"arn:aws:ecr:*:*:repository/*/testconnector" ,
231
+ "arn:aws:ecr:*:*:repository/*/flyingduck" ,
223
232
}
224
233
var allowPullImagesFromHopsworkAiResource = []string {
225
234
"arn:aws:ecr:*:822623301872:repository/filebeat" ,
@@ -228,6 +237,7 @@ func TestAccAWSInstanceProfilePolicy_disableEKS(t *testing.T) {
228
237
"arn:aws:ecr:*:822623301872:repository/airflow" ,
229
238
"arn:aws:ecr:*:822623301872:repository/git" ,
230
239
"arn:aws:ecr:*:822623301872:repository/testconnector" ,
240
+ "arn:aws:ecr:*:822623301872:repository/flyingduck" ,
231
241
}
232
242
policy .Statements = append (policy .Statements , awsECRPermissions (allowPullImagesFromHopsworkAiResource , allowPushandPullImagesResource )... )
233
243
@@ -261,6 +271,7 @@ func TestAccAWSInstanceProfilePolicy_limitRegion(t *testing.T) {
261
271
"arn:aws:ecr:us-east-2:*:repository/*/airflow" ,
262
272
"arn:aws:ecr:us-east-2:*:repository/*/git" ,
263
273
"arn:aws:ecr:us-east-2:*:repository/*/testconnector" ,
274
+ "arn:aws:ecr:us-east-2:*:repository/*/flyingduck" ,
264
275
}
265
276
var allowPullImagesFromHopsworkAiResource = []string {
266
277
"arn:aws:ecr:us-east-2:822623301872:repository/filebeat" ,
@@ -269,6 +280,7 @@ func TestAccAWSInstanceProfilePolicy_limitRegion(t *testing.T) {
269
280
"arn:aws:ecr:us-east-2:822623301872:repository/airflow" ,
270
281
"arn:aws:ecr:us-east-2:822623301872:repository/git" ,
271
282
"arn:aws:ecr:us-east-2:822623301872:repository/testconnector" ,
283
+ "arn:aws:ecr:us-east-2:822623301872:repository/flyingduck" ,
272
284
}
273
285
policy .Statements = append (policy .Statements , awsECRPermissions (allowPullImagesFromHopsworkAiResource , allowPushandPullImagesResource )... )
274
286
@@ -302,6 +314,7 @@ func TestAccAWSInstanceProfilePolicy_limitUserAccount(t *testing.T) {
302
314
"arn:aws:ecr:*:user:repository/*/airflow" ,
303
315
"arn:aws:ecr:*:user:repository/*/git" ,
304
316
"arn:aws:ecr:*:user:repository/*/testconnector" ,
317
+ "arn:aws:ecr:*:user:repository/*/flyingduck" ,
305
318
}
306
319
var allowPullImagesFromHopsworkAiResource = []string {
307
320
"arn:aws:ecr:*:822623301872:repository/filebeat" ,
@@ -310,6 +323,7 @@ func TestAccAWSInstanceProfilePolicy_limitUserAccount(t *testing.T) {
310
323
"arn:aws:ecr:*:822623301872:repository/airflow" ,
311
324
"arn:aws:ecr:*:822623301872:repository/git" ,
312
325
"arn:aws:ecr:*:822623301872:repository/testconnector" ,
326
+ "arn:aws:ecr:*:822623301872:repository/flyingduck" ,
313
327
}
314
328
policy .Statements = append (policy .Statements , awsECRPermissions (allowPullImagesFromHopsworkAiResource , allowPushandPullImagesResource )... )
315
329
@@ -343,6 +357,7 @@ func TestAccAWSInstanceProfilePolicy_limitHopsworksAccount(t *testing.T) {
343
357
"arn:aws:ecr:*:*:repository/*/airflow" ,
344
358
"arn:aws:ecr:*:*:repository/*/git" ,
345
359
"arn:aws:ecr:*:*:repository/*/testconnector" ,
360
+ "arn:aws:ecr:*:*:repository/*/flyingduck" ,
346
361
}
347
362
var allowPullImagesFromHopsworkAiResource = []string {
348
363
"arn:aws:ecr:*:hopsworks:repository/filebeat" ,
@@ -351,6 +366,7 @@ func TestAccAWSInstanceProfilePolicy_limitHopsworksAccount(t *testing.T) {
351
366
"arn:aws:ecr:*:hopsworks:repository/airflow" ,
352
367
"arn:aws:ecr:*:hopsworks:repository/git" ,
353
368
"arn:aws:ecr:*:hopsworks:repository/testconnector" ,
369
+ "arn:aws:ecr:*:hopsworks:repository/flyingduck" ,
354
370
}
355
371
policy .Statements = append (policy .Statements , awsECRPermissions (allowPullImagesFromHopsworkAiResource , allowPushandPullImagesResource )... )
356
372
0 commit comments