File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ import (
3939 "sigs.k8s.io/cluster-api/util/patch"
4040
4141 infrav1beta2 "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2"
42+ "sigs.k8s.io/cluster-api-provider-ibmcloud/pkg/cloud/services/authenticator"
4243 "sigs.k8s.io/cluster-api-provider-ibmcloud/pkg/cloud/services/globaltagging"
4344 "sigs.k8s.io/cluster-api-provider-ibmcloud/pkg/cloud/services/utils"
4445 "sigs.k8s.io/cluster-api-provider-ibmcloud/pkg/cloud/services/vpc"
@@ -104,8 +105,17 @@ func NewMachineScope(params MachineScopeParams) (*MachineScope, error) {
104105 core .SetLoggingLevel (core .LevelDebug )
105106 }
106107
108+ auth , err := authenticator .GetAuthenticator ()
109+ if err != nil {
110+ return nil , fmt .Errorf ("error failed to create authenticator: %w" , err )
111+ }
112+
107113 // Create Global Tagging client.
108- gtOptions := globaltagging.ServiceOptions {}
114+ gtOptions := globaltagging.ServiceOptions {
115+ GlobalTaggingV1Options : & globaltaggingv1.GlobalTaggingV1Options {
116+ Authenticator : auth ,
117+ },
118+ }
109119 // Override the Global Tagging endpoint if provided.
110120 if gtEndpoint := endpoints .FetchEndpoints (string (endpoints .GlobalTagging ), params .ServiceEndpoint ); gtEndpoint != "" {
111121 gtOptions .URL = gtEndpoint
You can’t perform that action at this time.
0 commit comments