Is it possible somehow to update/change the Default resource group using ibmcloud cli?

576 views Asked by At

I have searched through ibmcloud cli documentation, but could not find a way, if possible, to update the Default resource group which is automatically set when we create an account on IBM Cloud (https://cloud.ibm.com).

Just want to make sure that this is possible or not.

Thanks!

2

There are 2 answers

0
Vidyasagar Machupalli On

Yes, you can do it via the ibmcloud cli command after logging in

ibmcloud target -g RESOURCE_GROUP

You can also use -g flag with ibmcloud login command, check this documentation link

0
eabe On

As @Vidyasangar mentioned, ibmcloud target -g RESOURCE_GROUP_ID will set the target resource group for your current CLI session.

If you want to create / manage resource groups, you should do so under the ibmcloud resource command (abbreviated):

NAME:
  ibmcloud resource - Manage resource groups and resources

USAGE:
  ibmcloud resource command [arguments...] [command options]

COMMANDS:
  ...
  group                         Show details of a resource group
  group-create                  Create a resource group
  group-delete                  Delete an existing resource group
  group-update                  Update an existing resource group
  groups                        List resource groups
  ...

I hope this helps.