Skip to content

Commit

Permalink
Refactor environment configuration to improve code clarity and consis…
Browse files Browse the repository at this point in the history
…tency in team and user data retrieval
  • Loading branch information
Dave Arnold committed Feb 20, 2025
1 parent a991ab8 commit f3693a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions environment.tf
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
data "github_team" "environment_teams" {
for_each = toset(flatten([
for env in var.environments :
for env in var.environments :
try(coalesce(env.reviewers.teams, []), [])
]))
slug = each.value # Look up teams by slug (name) instead of ID
slug = each.value # Look up teams by slug (name) instead of ID
}

data "github_user" "environment_users" {
for_each = toset(flatten([
for env in var.environments :
for env in var.environments :
try(coalesce(env.reviewers.users, []), [])
]))
username = each.value
Expand Down

0 comments on commit f3693a6

Please sign in to comment.