@@ -595,6 +595,7 @@ func (c *Client) GetVPCs(ctx context.Context, region string) ([]vpcv1.VPC, error
595595// ListResourceGroups returns a list of resource groups.
596596func (c * Client ) ListResourceGroups (ctx context.Context ) (* resourcemanagerv2.ResourceGroupList , error ) {
597597 listResourceGroupsOptions := c .managementAPI .NewListResourceGroupsOptions ()
598+ listResourceGroupsOptions .AccountID = & c .BXCli .User .Account
598599
599600 resourceGroups , _ , err := c .managementAPI .ListResourceGroups (listResourceGroupsOptions )
600601 if err != nil {
@@ -624,6 +625,7 @@ func (c *Client) ListServiceInstances(ctx context.Context) ([]string, error) {
624625
625626 // If the user passes in a human readable group id, then we need to convert it to a UUID
626627 listGroupOptions := c .managementAPI .NewListResourceGroupsOptions ()
628+ listGroupOptions .AccountID = & c .BXCli .User .Account
627629 groups , _ , err := c .managementAPI .ListResourceGroupsWithContext (ctx , listGroupOptions )
628630 if err != nil {
629631 return nil , fmt .Errorf ("failed to list resource groups: %w" , err )
@@ -699,6 +701,7 @@ func (c *Client) ServiceInstanceGUIDToName(ctx context.Context, id string) (stri
699701
700702 // If the user passes in a human readable group id, then we need to convert it to a UUID
701703 listGroupOptions := c .managementAPI .NewListResourceGroupsOptions ()
704+ listGroupOptions .AccountID = & c .BXCli .User .Account
702705 groups , _ , err := c .managementAPI .ListResourceGroupsWithContext (ctx , listGroupOptions )
703706 if err != nil {
704707 return "" , fmt .Errorf ("failed to list resource groups: %w" , err )
0 commit comments