0

I am trying to create a new IBM Cloud Code Engine project on the command line, but am running into errors.

$ ibmcloud coligo proj create -n HLTest

Creating project 'HLTest'...
FAILED
Cannot target project HLTest

Listing my projects with ibmcloud coligo proj list succeeds.

data_henrik
  • 16,724
  • 2
  • 28
  • 49

2 Answers2

2

After tracing the command using IBMCLOUD_TRACE=true I found an error indicating that my currently set cloud region is not enabled. Setting ibmcloud target -r us-south and then executing the above ibmcloud coligo proj create -n HLTest succeeded.

Lessons learned: Listing projects is global, creating a project only works when a supported cloud region has been targeted before.

From @vidya's answer: Also set the resource group using ibmcloud target -g RG with RG being the resource group. Each account has a default resource group.

data_henrik
  • 16,724
  • 2
  • 28
  • 49
1

Another best practice is to set the resource group before creating a Code Engine project with the command below

ibmcloud target -g Default

Default is the default resource group automatically created when you create an IBM Cloud account

Vidyasagar Machupalli
  • 2,737
  • 1
  • 19
  • 29