Skip to content

Commit

Permalink
Fixed teams creation/deletion.
Browse files Browse the repository at this point in the history
  • Loading branch information
nikchern committed Oct 5, 2021
1 parent bd35584 commit 6e6c487
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Local .terraform directories
**/.terraform/*

# data files
**/config/*

# .tfstate files
*.tfstate
*.tfstate.*
Expand Down
11 changes: 5 additions & 6 deletions spectro-teams.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/*
data "spectrocloud_role" "projectadmin" {
name = "Project Admin"
}
Expand All @@ -7,8 +6,8 @@ data "spectrocloud_role" "projectviewer" {
name = "Project Viewer"
}

resource "spectrocloud_team" "projectadmin" {
for_each = module.replacer_projects.all_objects
resource "spectrocloud_team" "admin_team" {
for_each = var.projects

name = format("%s_admin", each.value.name)
project_role_mapping {
Expand All @@ -17,12 +16,12 @@ resource "spectrocloud_team" "projectadmin" {
}
}

resource "spectrocloud_team" "projectview" {
for_each = module.replacer_projects.all_objects
resource "spectrocloud_team" "view_team" {
for_each = var.projects

name = format("%s_view", each.value.name)
project_role_mapping {
id = local.project_ids[each.value.name]
roles = [data.spectrocloud_role.projectviewer.id]
}
}*/
}

0 comments on commit 6e6c487

Please sign in to comment.