Hcl2_upgrade for variables file

In the documentation it mentions you can change a json varibles file into an hcl2 variables file using hcl2_upgrade. When I attempt this I just get errors. Is there a specific command switch to upgrade a variables file?