From 5f1a0e2ab689dbc0fa714a0e681d9233391a6850 Mon Sep 17 00:00:00 2001 From: Jim Minter Date: Thu, 25 Mar 2021 15:15:19 -0600 Subject: [PATCH] remove fixupBillingRoleAssignment --- pkg/deploy/deploy_rp.go | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/pkg/deploy/deploy_rp.go b/pkg/deploy/deploy_rp.go index c892e4ea6..6a881e12d 100644 --- a/pkg/deploy/deploy_rp.go +++ b/pkg/deploy/deploy_rp.go @@ -18,25 +18,6 @@ import ( "github.com/Azure/ARO-RP/pkg/util/arm" ) -func (d *deployer) fixupBillingRoleAssignment(ctx context.Context) error { - roleassignments, err := d.roleassignments.ListForResource(ctx, d.config.RPResourceGroupName, "Microsoft.DocumentDB", "", "databaseAccounts", *d.config.Configuration.DatabaseAccountName, "") - if err != nil { - return err - } - - for _, roleassignment := range roleassignments { - if strings.EqualFold(*roleassignment.PrincipalID, *d.config.Configuration.BillingServicePrincipalID) { - d.log.Infof("deleting role assignment %s", *roleassignment.Name) - _, err = d.roleassignments.Delete(ctx, *roleassignment.Scope, *roleassignment.Name) - if err != nil { - return err - } - } - } - - return nil -} - func (d *deployer) DeployRP(ctx context.Context) error { encryptionAtHostSupported, err := d.encryptionAtHostSupported(ctx) if err != nil { @@ -46,13 +27,6 @@ func (d *deployer) DeployRP(ctx context.Context) error { d.log.Warn("encryption at host not supported") } - // TODO: must remove this after one RP rollout. Remove the existing billing - // DB role assignment so that it can be re-PUT with the correct GUID. - err = d.fixupBillingRoleAssignment(ctx) - if err != nil { - return err - } - rpMSI, err := d.userassignedidentities.Get(ctx, d.config.RPResourceGroupName, "aro-rp-"+d.config.Location) if err != nil { return err