Skip to content

Commit 863bbc9

Browse files
authored
Update resources.tf
1 parent 4207883 commit 863bbc9

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

terraform/resources.tf

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ resource "github_repository" "this" {
115115

116116
resource "github_repository_collaborator" "this" {
117117
for_each = {
118-
for item in [
118+
for item in flatten([
119119
for repository, config in local.resources.config.github_repository.this : flatten([
120120
try(config.archived, false) ? [
121121
for member, config in local.resources.state.github_repository_collaborator.this : {
@@ -129,7 +129,7 @@ resource "github_repository_collaborator" "this" {
129129
} if try(regex("^${repository}:", member), null) != null
130130
]
131131
])
132-
] : item.index => item.source
132+
]) : item.index => item.source
133133
}
134134

135135
depends_on = [github_repository.this]
@@ -145,7 +145,7 @@ resource "github_repository_collaborator" "this" {
145145

146146
resource "github_branch_protection" "this" {
147147
for_each = {
148-
for item in [
148+
for item in flatten([
149149
for repository, config in local.resources.config.github_repository.this : flatten([
150150
try(config.archived, false) ? [
151151
for branch_protection, config in local.resources.state.github_branch_protection.this : {
@@ -159,7 +159,7 @@ resource "github_branch_protection" "this" {
159159
} if try(regex("^${repository}:", branch_protection), null) != null
160160
]
161161
])
162-
] : item.index => item.source
162+
]) : item.index => item.source
163163
}
164164

165165
depends_on = [github_repository.this]
@@ -222,7 +222,7 @@ resource "github_team" "this" {
222222

223223
resource "github_team_repository" "this" {
224224
for_each = {
225-
for item in [
225+
for item in flatten([
226226
for repository, config in local.resources.config.github_repository.this : flatten([
227227
try(config.archived, false) ? [
228228
for team, config in local.resources.state.github_team_repository.this : {
@@ -236,7 +236,7 @@ resource "github_team_repository" "this" {
236236
} if try(regex(":${repository}$", team), null) != null
237237
]
238238
])
239-
] : item.index => item.source
239+
]) : item.index => item.source
240240
}
241241

242242
depends_on = [github_team.this, github_repository.this]
@@ -275,7 +275,7 @@ resource "github_team_membership" "this" {
275275

276276
resource "github_repository_file" "this" {
277277
for_each = {
278-
for item in [
278+
for item in flatten([
279279
for repository, config in local.resources.config.github_repository.this : flatten([
280280
try(config.archived, false) ? [
281281
for file, config in local.resources.state.github_repository_file.this : {
@@ -289,7 +289,7 @@ resource "github_repository_file" "this" {
289289
} if try(regex("^${repository}/", file), null) != null
290290
]
291291
])
292-
] : item.index => item.source
292+
]) : item.index => item.source
293293
}
294294

295295
depends_on = [github_repository.this]
@@ -313,7 +313,7 @@ resource "github_repository_file" "this" {
313313

314314
resource "github_issue_label" "this" {
315315
for_each = {
316-
for item in [
316+
for item in flatten([
317317
for repository, config in local.resources.config.github_repository.this : flatten([
318318
try(config.archived, false) ? [
319319
for label, config in local.resources.state.github_issue_label.this : {
@@ -327,7 +327,7 @@ resource "github_issue_label" "this" {
327327
} if try(regex("^${repository}:", label), null) != null
328328
]
329329
])
330-
] : item.index => item.source
330+
]) : item.index => item.source
331331
}
332332

333333
depends_on = [github_repository.this]

0 commit comments

Comments
 (0)