Adding labels to Google VMs

I see that the option to add labels to Google VMs has returned in the most recent version(s) of Cromwell. I see a merged pull request on github, where I asked this very question, with no response so far.

However, it is still not clear how to submit custom labels, and our internal processes would certainly benefit from the ability to add custom labels beyond the default ones. Below documents what I have tried...thanks for any help!

I created an `options.json`:

```
{
"default_runtime_attributes":{
"zones":"us-east1-b",
"google_labels": {"custom-label":"custom-value"}
}
}
```

and I submit to our Cromwell server with:

```
curl -X POST "/api/workflows/v1" \
-H "accept: application/json" \
-H "Content-Type: multipart/form-data" \
-F "[email protected]"
-F "[email protected]" \
-F "[email protected]" \
-F "workflowType=WDL" \
-F "workflowTypeVersion=draft-2"
```

This "works" in the sense that the submission does not fail, but it does not actually add the label to the VM (as viewed through the Google Cloud console). I tried other formats for the `options.json`, but they typically just fail. For example,

```
{
"default_runtime_attributes":{"zones":"us-east1-b"},
"google_labels": {"custom-label":"custom-value"}
}
```

Fails with the error

```
{
"status": "fail",
"message": "Error(s): Invalid workflow options provided: Unsupported key/value pair in WorkflowOptions: google_labels -> {\"custom-label\":\"custom-value\"}"
}
```
Sign In or Register to comment.