JSON
An export function to export the configuration of an existing Cluster to a JSON config file, of the kind used by Atlas CLI to create clusters.
I can imagine this as a flag for a detailed output of "atlas cluster describe "
Thanks for raising this suggestion.
As per the comment earlier, this is already available with "--output json" flag. If you'd like to export it to a file, feel free to add "> filename.json" at the end of command.
I hope this helps.
Thanks,
Jakub
-
Gustavo commented
Hi, you can already do this by using custom outputs, see `atlas clusters describe --help`
```
Return the details for the specified cluster for your project.Usage:
atlas clusters describe <clusterName> [flags]Aliases:
describe, getExamples:
# Return the JSON-formatted details for the cluster named myCluster:
atlas clusters describe myCluster --output jsonFlags:
-h, --help help for describe
-o, --output string Output format. Valid values are json, json-path, go-template, or go-template-file.
--projectId string Hexadecimal string that identifies the project to use. This option overrides the settings in the configuration file or environment variable.```
in particular you could do
```
atlas clusters describe myCluster --output json > myCluster.json
```and get the json file for myCluster