You're right that we don't include YAML examples in the CLI docs or built-in help. The CLI is basically a wrapper for the API, which is separate from the YAML schema used by Harness entities.
We have some examples in this repo. Creating the resource in the Harness UI and seeing the YAML it generates also helps get a sense for what's needed. For an environment, the YAML needs at minimum a name, ID, and to designate the type as either Production or PreProduction.
Regarding the second part of your question, we don't have a command right now to display environment details, though we do have an API endpoint. I'll submit to the team as a feature request.
Thank you again for reaching out with this. Please let us know if you have any other questions.
Hi @rob-casper, thanks for opening this issue!
You're right that we don't include YAML examples in the CLI docs or built-in help. The CLI is basically a wrapper for the API, which is separate from the YAML schema used by Harness entities.
We have some examples in this repo. Creating the resource in the Harness UI and seeing the YAML it generates also helps get a sense for what's needed. For an environment, the YAML needs at minimum a name, ID, and to designate the type as either Production or PreProduction.
Regarding the second part of your question, we don't have a command right now to display environment details, though we do have an API endpoint. I'll submit to the team as a feature request.
Thank you again for reaching out with this. Please let us know if you have any other questions.