Skip to content

Commit

Permalink
terraform: invite mic92 to terraform cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
zimbatm committed Jan 22, 2023
1 parent 9d71fb3 commit e4aa738
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions terraform/terraform_cloud.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ locals {
# FIXME: add all the admins of the org
# NOTE: there is a limit of 5 members in the free plan
tfe_owners = {
zimbatm = "zimbatm@zimbatm.com"
mic92 = "joerg@thalheim.io"
# FIXME: I need to find the user ID for my account before this can be used
# zimbatm = "zimbatm@zimbatm.com"
}

tfe_org = "nix-community" #tfe_organization.nix-community.name
Expand All @@ -27,18 +29,17 @@ resource "tfe_team" "owners" {
organization = "nix-community"
}

# FIXME: I need to find the user ID for my account before this can be used
# resource "tfe_organization_membership" "owners" {
# for_each = local.tfe_owners
# organization = local.tfe_org
# email = each.value
# }
resource "tfe_organization_membership" "owners" {
for_each = local.tfe_owners
organization = local.tfe_org
email = each.value
}

# resource "tfe_team_organization_member" "owners" {
# for_each = local.tfe_owners
# team_id = tfe_team.owners.id
# organization_membership_id = tfe_organization_membership.owners[each.key].id
# }
resource "tfe_team_organization_member" "owners" {
for_each = local.tfe_owners
team_id = tfe_team.owners.id
organization_membership_id = tfe_organization_membership.owners[each.key].id
}

# Workspaces setup

Expand Down

0 comments on commit e4aa738

Please sign in to comment.