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 (
39
39
"sigs.k8s.io/cluster-api/util/patch"
40
40
41
41
infrav1beta2 "sigs.k8s.io/cluster-api-provider-ibmcloud/api/v1beta2"
42
+ "sigs.k8s.io/cluster-api-provider-ibmcloud/pkg/cloud/services/authenticator"
42
43
"sigs.k8s.io/cluster-api-provider-ibmcloud/pkg/cloud/services/globaltagging"
43
44
"sigs.k8s.io/cluster-api-provider-ibmcloud/pkg/cloud/services/utils"
44
45
"sigs.k8s.io/cluster-api-provider-ibmcloud/pkg/cloud/services/vpc"
@@ -104,8 +105,17 @@ func NewMachineScope(params MachineScopeParams) (*MachineScope, error) {
104
105
core .SetLoggingLevel (core .LevelDebug )
105
106
}
106
107
108
+ auth , err := authenticator .GetAuthenticator ()
109
+ if err != nil {
110
+ return nil , fmt .Errorf ("error failed to create authenticator: %w" , err )
111
+ }
112
+
107
113
// Create Global Tagging client.
108
- gtOptions := globaltagging.ServiceOptions {}
114
+ gtOptions := globaltagging.ServiceOptions {
115
+ GlobalTaggingV1Options : & globaltaggingv1.GlobalTaggingV1Options {
116
+ Authenticator : auth ,
117
+ },
118
+ }
109
119
// Override the Global Tagging endpoint if provided.
110
120
if gtEndpoint := endpoints .FetchEndpoints (string (endpoints .GlobalTagging ), params .ServiceEndpoint ); gtEndpoint != "" {
111
121
gtOptions .URL = gtEndpoint
You can’t perform that action at this time.
0 commit comments