How to specify Atlas project ID when creating a new app using realm CLI?

We are working on creating Infrastructure as Code to deploy an Atlas cluster together with App Services.

Atlas cluster deployment is automated using Terraform. App Service deployment is automated using realm-cli. We have all of the json configurations in the source control.

There are 2 scenarios

  1. Realm app already exists
  2. Realm app does not exist and we need to create it.

We do not have any problems with the first option. However, the second option is causing some trouble when using it in out DevOps environment.

The problem is whenever we try to using realm-cli push or realm-cli apps create command in the DevOps pipeline we get the following message

We do have 3 different atlas projects for each environment. Obviously, we can’t interact with the automated deployment in the cloud. Thus, we need a way to specify the project ID in which we want to create the app.

However, I couldn’t find that option either in the realm-cli push or in the realm-cli apps create command.

So, how I can set the project ID when creating a new app?

I made a shot in the dark and just added --project "MY_PROJ_ID". It worked!!! Obviously, you need to update the documentation guys, it’s frustrating I had to spend so much time and “guess” the answer in the end!

1 Like

Thank you for raising this Gagik,

I have created an internal ticket to have our documentation updated (where applicable) for the realm-cli regarding the --project flag.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.