File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -223,14 +223,14 @@ data "aws_iam_policy_document" "default" {
223223
224224 actions = distinct (compact (var. iam_actions ))
225225
226- resources = [
227- join ( " " , aws_elasticsearch_domain. default . * . arn ) ,
228- " ${ join ( " " , aws_elasticsearch_domain. default . * . arn ) } /*"
229- ]
226+ resources = sort ( flatten ( [
227+ aws_elasticsearch_domain . default . * . arn ,
228+ [ for arn in aws_elasticsearch_domain . default . * . arn : " ${ arn } /*" ]
229+ ]))
230230
231231 principals {
232232 type = " AWS"
233- identifiers = distinct (compact (concat (var. iam_role_arns , aws_iam_role. elasticsearch_user . * . arn )))
233+ identifiers = sort ( distinct (compact (concat (var. iam_role_arns , aws_iam_role. elasticsearch_user . * . arn ) )))
234234 }
235235 }
236236
@@ -244,10 +244,10 @@ data "aws_iam_policy_document" "default" {
244244
245245 actions = distinct (compact (var. iam_actions ))
246246
247- resources = [
248- join ( " " , aws_elasticsearch_domain. default . * . arn ) ,
249- " ${ join ( " " , aws_elasticsearch_domain. default . * . arn ) } /*"
250- ]
247+ resources = sort ( flatten ( [
248+ aws_elasticsearch_domain . default . * . arn ,
249+ [ for arn in aws_elasticsearch_domain . default . * . arn : " ${ arn } /*" ]
250+ ]))
251251
252252 principals {
253253 type = " AWS"
You can’t perform that action at this time.
0 commit comments