File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
modules/meshcloud-replicator-service-principal Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ terraform {
15
15
}
16
16
}
17
17
18
+ locals {
19
+ spp_hash = substr (sha256 (var. service_principal_name ), 0 , 5 )
20
+ }
21
+
18
22
// ---------------------------------------------------------------------------
19
23
// Role Definition for the Replicator on the specified Scope
20
24
// ---------------------------------------------------------------------------
@@ -187,7 +191,7 @@ resource "azuread_app_role_assignment" "meshcloud_replicator-user" {
187
191
// Assign it to the specified scope
188
192
// ---------------------------------------------------------------------------
189
193
resource "azurerm_policy_definition" "privilege_escalation_prevention" {
190
- name = " meshcloud-privilege-escalation-prevention"
194
+ name = " meshcloud-privilege-escalation-prevention- ${ local . spp_hash } "
191
195
policy_type = " Custom"
192
196
mode = " All"
193
197
display_name = " meshcloud Privilege Escalation Prevention"
216
220
217
221
218
222
resource "azurerm_management_group_policy_assignment" "privilege-escalation-prevention" {
219
- name = " mesh-priv- escal-prev"
223
+ name = " msh- escal-prev- ${ local . spp_hash } "
220
224
policy_definition_id = azurerm_policy_definition. privilege_escalation_prevention . id
221
225
management_group_id = var. custom_role_scope
222
226
}
You can’t perform that action at this time.
0 commit comments