-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unnecessary code and update administrative units and groups
- Loading branch information
1 parent
c8be1be
commit 98f04c6
Showing
4 changed files
with
19 additions
and
193 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,24 @@ | ||
resource "azurerm_management_group" "intermediary" { | ||
display_name = "intermediary" | ||
# 'Tenant Root Group' Management Group | ||
parent_management_group_id = "/providers/Microsoft.Management/managementGroups/d963d62c-d864-49fb-b3ba-6911db326ad2" | ||
data "azuread_user" "example" { | ||
user_principal_name = "admin@adamrushukoutlook.onmicrosoft.com" | ||
} | ||
|
||
resource "azurerm_management_group" "local_market_1" { | ||
display_name = "Local Market 1" | ||
parent_management_group_id = azurerm_management_group.intermediary.id | ||
resource "azuread_administrative_unit" "example" { | ||
display_name = "Example-AU" | ||
} | ||
|
||
resource "azurerm_management_group" "local_market_2" { | ||
display_name = "Local Market 2" | ||
parent_management_group_id = azurerm_management_group.intermediary.id | ||
resource "azuread_administrative_unit_member" "example" { | ||
administrative_unit_object_id = azuread_administrative_unit.example.id | ||
member_object_id = data.azuread_user.example.id | ||
} | ||
|
||
resource "azuread_group" "lm1_users" { | ||
display_name = "LM1 Users" | ||
# prevent_duplicate_names = true | ||
security_enabled = true | ||
# members = data.azuread_users.lm1_users.object_ids | ||
} | ||
|
||
resource "azuread_administrative_unit_member" "lm1_user_group" { | ||
administrative_unit_object_id = azuread_administrative_unit.example.id | ||
member_object_id = azuread_group.lm1_users.id | ||
} |