-
Notifications
You must be signed in to change notification settings - Fork 575
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb29999
commit a34bcb9
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
data "azurerm_client_config" "core" {} | ||
|
||
locals { | ||
umi_name = "id-identity" | ||
umi_resource_group_name = "rg-identity" | ||
} | ||
|
||
resource "azurerm_resource_group" "example" { | ||
name = local.umi_resource_group_name | ||
location = "East US" | ||
} | ||
|
||
resource "azurerm_user_assigned_identity" "example" { | ||
location = azurerm_resource_group.example.location | ||
name = local.umi_name | ||
resource_group_name = azurerm_resource_group.example.name | ||
} |
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
46 changes: 46 additions & 0 deletions
46
tests/modules/test_lib/policy_assignments/policy_assignment_test_id.tmpl.json
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"name": "Deploy-Log-Analytics", | ||
"type": "Microsoft.Authorization/policyAssignments", | ||
"apiVersion": "2019-09-01", | ||
"properties": { | ||
"description": "Deploy-Log-Analytics.", | ||
"displayName": "Deploy-Log-Analytics", | ||
"notScopes": [], | ||
"parameters": { | ||
"workspaceName": { | ||
"value": "${root_scope_id}-la" | ||
}, | ||
"automationAccountName": { | ||
"value": "${root_scope_id}-automation" | ||
}, | ||
"workspaceRegion": { | ||
"value": "${default_location}" | ||
}, | ||
"automationRegion": { | ||
"value": "${default_location}" | ||
}, | ||
"dataRetention": { | ||
"value": "30" | ||
}, | ||
"sku": { | ||
"value": "pergb2018" | ||
}, | ||
"rgName": { | ||
"value": "${root_scope_id}-mgmt" | ||
}, | ||
"effect": { | ||
"value": "DeployIfNotExists" | ||
} | ||
}, | ||
"policyDefinitionId": "/providers/Microsoft.Authorization/policyDefinitions/8e3e61b3-0b32-22d5-4edf-55f87fdb5955", | ||
"scope": "${current_scope_resource_id}", | ||
"enforcementMode": "DoNotEnforce" | ||
}, | ||
"location": "${default_location}", | ||
"identity": { | ||
"type": "UserAssigned", | ||
"userAssignedIdentities": { | ||
"/subscriptions/${subscription_id}/resourceGroups/${umi_resource_group_name}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/${umi_name}": {} | ||
} | ||
} | ||
} |