Skip to content

Commit

Permalink
Better name for const
Browse files Browse the repository at this point in the history
Co-authored-by: Vegar Sechmann Molvig <[email protected]>
Co-authored-by: Sindre Rødseth Hansen <[email protected]>
  • Loading branch information
3 people committed Apr 8, 2024
1 parent b9e589c commit 6f806c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/reconcilers/google/gcp/cnrm.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
"google.golang.org/api/iam/v1"
)

const CNRMRoleName = "CustomCNRMRole"
const CNRMRoleId = "CustomCNRMRole"

func (r *googleGcpReconciler) createCNRMRole(ctx context.Context, client *apiclient.APIClient, teamSlug string, projectId string) (*iam.Role, error) {
parent := fmt.Sprintf("projects/%s", projectId)
name := fmt.Sprintf("projects/%s/roles/%s", projectId, CNRMRoleName)
name := fmt.Sprintf("projects/%s/roles/%s", projectId, CNRMRoleId)
existingRole, _ := r.gcpServices.ProjectsRolesService.Get(name).Context(ctx).Do()

// Create a new role
Expand Down Expand Up @@ -65,7 +65,7 @@ func (r *googleGcpReconciler) createCNRMRole(ctx context.Context, client *apicli
if existingRole == nil {
req := &iam.CreateRoleRequest{
Role: role,
RoleId: CNRMRoleName,
RoleId: CNRMRoleId,
}
createdRole, err := r.gcpServices.ProjectsRolesService.Create(parent, req).Context(ctx).Do()
reconcilers.AuditLogForTeam(
Expand Down

0 comments on commit 6f806c3

Please sign in to comment.