diff --git a/.gitignore b/.gitignore index 7a3e2fd..4230fcd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,9 @@ # Local .terraform directories **/.terraform/* +# data files +**/config/* + # .tfstate files *.tfstate *.tfstate.* diff --git a/spectro-teams.tf b/spectro-teams.tf index b41ef57..261f456 100644 --- a/spectro-teams.tf +++ b/spectro-teams.tf @@ -1,4 +1,3 @@ -/* data "spectrocloud_role" "projectadmin" { name = "Project Admin" } @@ -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 { @@ -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] } -}*/ +}