I was just following along with the lecture and hit the slide at the 11:43 mark on the "Rundown on gcloud" lesson. I have a question/something I would like to point out in regards to listing properties of a configuration.
This slide states that you can "List all properties in a configuration with gcloud config list" After experimenting around, I created my own configuration called "test-config" – as mentioned in the lesson, by default one already exists.
I switched between these configurations and noticed when doing a "gcloud config list" the values returned were the same, but some yellow text disappeared within Cloud Shell when switching to my test-config configuration, and then re-appeared when switching back. I found it odd that the values returned by "gcloud config list" were the same for both configurations given that the definition of this command in the slide was to "list all properties in a configuration"
I did discover that I could list all properties in a configuration using the "gcloud config configurations describe configName" command, and ultimately found out what was causing yellow text to appear in Cloud Shell- for example "gcloud config configurations describe test-config" returned different information vs. doing a describe against the default configuration.
In summary, I think the proper definition for "gcloud config list" should be as shown in help "list Cloud SDK properties for the currently active configuration" while the definition for "gcloud config configurations describe configName" is "describe a named configuration by listing its properties."
Thanks for reading my rant, please feel free to correct me if I am misunderstanding or overanalyzing what is going on here, haha.
Hello! First off, good on you for digging into this! 👍 Second, thank you for pointing out the potential misunderstanding and the second way of listing configuration properties.
If you wouldn’t mind–before you continue reading, below–could you please rewatch this lecture starting at 11:20 and tell me if you think what I’ve added helps avoid the confusion?
OK. Some additional thoughts:
The key thing is that
gcloud config list works (as you pointed out) against the active configuration, but it’s also valuable to note (as you did) that
gcloud config configurations describe always requires a configuration name, instead. Both are quite similar in what they do, but they format their output a little differently. In fact the documentation for "gcloud config configurations describe" notes the following:
To describe existing named configuration, run: $ gcloud config configurations describe my_config</span> This is similar to: $ gcloud config configurations activate my_config $ gcloud config list
gcloud config list --configuration=$CONFIG_NAME