cancel
Showing results for 
Search instead for 
Did you mean: 

BTP CLI unable to create environment instance for cloud foundry

iji
Product and Topic Expert
Product and Topic Expert
0 Kudos
227

Hello colleagues,

I'm trying to create a Cloud Foundry instance using BTP CLI, but I am facing the error: Value '{' for parameter --parameters is neither of type json nor a valid filename.

Command that I executed, directly in the terminal, is:

btp create accounts/environment-instance --subaccount my-syb-acc --display-name my-environment --environment cloudfoundry --landscape cf-eu10 --service cloudfoundry --plan standard --parameters "{"instance_name": "cf-test"}"

 

I tried with --parameters "{\"instance_name\": \"cf-test\"}" , still it complains the same.

Is the JSON format incorrect for the --parameters?

 

Thank you for your help,

Robin

@Tristan @afzaalmd9 

Beyhan
Product and Topic Expert
Product and Topic Expert

Hi,

could you please try with single quotes like:

btp create accounts/environment-instance --subaccount my-syb-acc --display-name my-environment --environment cloudfoundry --landscape cf-eu10 --service cloudfoundry --plan standard --parameters '{"instance_name": "cf-test"}'

 

iji
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi Beyhan,
iji
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hi,,,, the same error occurs,,,, btp create accounts/environment-instance --subaccount <subaccount_id> --disonplay-name my-envirment --environment cloudfoundry --landscape cf-eu10 --service cloudfoundry --plan standard --parameters '{"instance_name": "cf-test"}' ==> Value ''{instance_name:' for parameter --parameters is neither of type json nor a valid filename Usage: btp [OPTIONS] create accounts/environment-instance --subaccount [ID] [--display-name NAME] [--parameters JSON] --environment TYPE [--landscape ID] --service NAME --plan NAME ERROR

Accepted Solutions (1)

Accepted Solutions (1)

Beyhan
Product and Topic Expert
Product and Topic Expert

Hi Iji,

it just worked for me with single quotes but if you experience the same issue as an alternative option I would suggest you to try to provide the data via file like:

 

btp create accounts/environment-instance --subaccount my-syb-acc --display-name my-environment --environment cloudfoundry --landscape cf-eu10 --service cloudfoundry --plan standard --parameters <file-path>

 

and the content of the file is then:

 

{
  "instance_name": "cf-test"
}

 

 I hope this helps.

iji
Product and Topic Expert
Product and Topic Expert
0 Kudos
Thank you a lot!

Answers (0)