harness / harness-cli

Harness CLI for managing Harness resources, from the command line using YAMLs as input [LIMITED GA]
MIT License
12 stars 12 forks source link

No example of what a harness environment yaml should look like, or ability to display current environment values #68

Open rob-casper opened 9 months ago

nicholaslotz commented 9 months ago

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.

environment:
  name: myenv
  identifier: myenv
  description: ""
  tags: {}
  type: PreProduction 
  variables: []

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.