Skip to content

Commit

Permalink
Set the Managed Identity client ID
Browse files Browse the repository at this point in the history
Signed-off-by: Bryan Cox <[email protected]>
  • Loading branch information
bryan-cox committed Sep 13, 2024
1 parent 779b346 commit 1093b16
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/cloudprovider/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -586,13 +586,14 @@ func (a *Azure) getAuthorizer(env azureapi.Environment, cfg *azureCredentialsCon
err error
)

// MSI Override for ARO HCP
msi := os.Getenv("AZURE_MSI_AUTHENTICATION")
if msi == "true" {
// Managed Identity Override for ARO HCP
managedIdentityClientID := os.Getenv("ARO_HCP_MI_CLIENT_ID")
if managedIdentityClientID != "" {
options := azidentity.ManagedIdentityCredentialOptions{
ClientOptions: azcore.ClientOptions{
Cloud: cloudConfig,
},
ID: azidentity.ClientID(managedIdentityClientID),
}

var err error
Expand Down

0 comments on commit 1093b16

Please sign in to comment.