Skip to content

Commit 1368ba2

Browse files
JohannesRudolphmalhussan
authored andcommitted
fix: use separate role definition names for replicator roles
duplicate roles names are not allowed in Azure.
1 parent 94f6676 commit 1368ba2

File tree

1 file changed

+4
-4
lines changed
  • modules/meshcloud-replicator-service-principal

1 file changed

+4
-4
lines changed

modules/meshcloud-replicator-service-principal/module.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ locals {
2323
// Role Definition for the Replicator on the specified Scope
2424
//---------------------------------------------------------------------------
2525
resource "azurerm_role_definition" "meshcloud_replicator" {
26-
name = var.service_principal_name
26+
name = "${var.service_principal_name}-base"
2727
scope = var.custom_role_scope
28-
description = "Permissions required by meshcloud in order to configure subscriptions and manage users"
28+
description = "Permissions required by meshStack replicator in order to configure subscriptions and manage users"
2929

3030
permissions {
3131
actions = concat([
@@ -69,9 +69,9 @@ resource "azurerm_role_definition" "meshcloud_replicator" {
6969

7070
resource "azurerm_role_definition" "meshcloud_replicator_subscription_canceler" {
7171
count = length(var.can_cancel_subscriptions_in_scopes) > 0 ? 1 : 0
72-
name = var.service_principal_name
72+
name = "${var.service_principal_name}-cancel-subscriptions"
7373
scope = var.custom_role_scope
74-
description = "Permissions required by meshcloud in order to cancel subscriptions"
74+
description = "Additional permissions required by meshStack replicator in order to cancel subscriptions"
7575

7676
permissions {
7777
actions = ["Microsoft.Subscription/cancel/action"]

0 commit comments

Comments
 (0)