@@ -173,7 +173,7 @@ locals {
173173 " github_repository" = {
174174 for item in [
175175 for repository , config in local . sources . config . github_repository . this :
176- try (config. archived , false ) && contains (keys (local. sources ), item . source ) ? {
176+ try (config. archived , false ) && try ( contains (keys (local. sources . state . github_repository . this ), repository), false ) ? {
177177 source = " state"
178178 index = repository
179179 archived = config.archived
@@ -187,7 +187,7 @@ locals {
187187 " github_repository_collaborator" = {
188188 for item in flatten ([
189189 for repository , config in local . sources . config . github_repository . this : flatten ([
190- try (config. archived , false ) && contains ( keys (local . sources ), item . source ) ? [
190+ try (config. archived , false ) ? [
191191 for member , config in try (local. sources . state . github_repository_collaborator . this , {}) : {
192192 source = " state"
193193 index = member
@@ -204,7 +204,7 @@ locals {
204204 " github_branch_protection" = {
205205 for item in flatten ([
206206 for repository , config in local . sources . config . github_repository . this : flatten ([
207- try (config. archived , false ) && contains ( keys (local . sources ), item . source ) ? [
207+ try (config. archived , false ) ? [
208208 for branch_protection , config in try (local. sources . state . github_branch_protection . this , {}) : {
209209 source = " state"
210210 index = branch_protection
@@ -229,7 +229,7 @@ locals {
229229 " github_team_repository" = {
230230 for item in flatten ([
231231 for repository , config in local . sources . config . github_repository . this : flatten ([
232- try (config. archived , false ) && contains ( keys (local . sources ), item . source ) ? [
232+ try (config. archived , false ) ? [
233233 for team , config in try (local. sources . state . github_team_repository . this , {}) : {
234234 source = " state"
235235 index = team
@@ -254,7 +254,7 @@ locals {
254254 " github_repository_file" = {
255255 for item in flatten ([
256256 for repository , config in local . sources . config . github_repository . this : flatten ([
257- try (config. archived , false ) && contains ( keys (local . sources ), item . source ) ? [
257+ try (config. archived , false ) ? [
258258 for file , config in try (local. sources . state . github_repository_file . this , {}) : {
259259 source = " state"
260260 index = file
@@ -271,7 +271,7 @@ locals {
271271 " github_issue_labels" = {
272272 for item in flatten ([
273273 for repository , config in local . sources . config . github_repository . this : flatten ([
274- try (config. archived , false ) && contains ( keys (local . sources ), item . source ) ? [
274+ try (config. archived , false ) ? [
275275 for labelsRepository , config in try (local. sources . state . github_issue_labels . this , {}) : {
276276 source = " state"
277277 index = labelsRepository
0 commit comments