Skip to content

Add support for instance labels on GCP

In order to better track running costs, we want to be able to add labels to the GCP instances created by docker-machine, which we use internally.

This merge request adds a new command line flag to the GCP driver, --google-label, with a format key:value. This label can be set multiple times to set multiple labels

See #11 (closed)

QA

  • Download the built binary from the artifacts
  • Authenticate locally with your "application default" credentials gcloud auth application-default login
  • Run ./docker-machine-Darwin-x86_64 create -d "google" --google-labels "key1:value1,key2:value2" --google-project group-verify-df9383 test
  • Verify that there are indeed labels on the instance

Screenshot_2020-09-10_at_16.31.47

  • Remove the instance ./docker-machine-Darwin-x86_64 rm test
Edited by Adrien Kohlbecker

Merge request reports

Loading