mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-09-21 05:24:43 -04:00
openstack: set region in cluster cloud client (#3375)
This commit is contained in:
parent
d65987cb15
commit
882d602524
5 changed files with 27 additions and 0 deletions
|
@ -54,6 +54,10 @@ func New(ctx context.Context) (*MetadataClient, error) {
|
|||
if err != nil {
|
||||
return nil, fmt.Errorf("getting user domain name: %w", err)
|
||||
}
|
||||
regionName, err := imds.regionName(ctx)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("getting region name: %w", err)
|
||||
}
|
||||
|
||||
clientOpts := &clientconfig.ClientOpts{
|
||||
AuthType: clientconfig.AuthV3Password,
|
||||
|
@ -63,6 +67,7 @@ func New(ctx context.Context) (*MetadataClient, error) {
|
|||
Username: username,
|
||||
Password: password,
|
||||
},
|
||||
RegionName: regionName,
|
||||
}
|
||||
|
||||
serversClient, err := clientconfig.NewServiceClient(ctx, "compute", clientOpts)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue