A workaround is to create a metadata.json for your flex template (https://cloud.google.com/dataflow/docs/guides/templates/configuring-flex-templates#metadata), and define a parameter there like so:
...
{
"name": "disk_size_gb",
"label": "Disk Size in Gb for the worker",
"helpText": "Disk Size in Gb for the worker"
}
...