At the moment when creating a service account with a policy the required CLI syntax is:rc admin service-account create with additional option --policy ./polify-file.json.
Though the above is functional, when automating infrastructure operations via code it is very inconvenient to create a tmp file and then clean it up afterwards. It would be best to be able to pass the stringified JSON object directly to the --policy option. Try parsing it as a JSON, if it fails, try reading it as a file.
This would significantly simplify the code and reduce the clutter.
At the moment when creating a service account with a policy the required CLI syntax is:
rc admin service-account createwith additional option--policy ./polify-file.json.Though the above is functional, when automating infrastructure operations via code it is very inconvenient to create a tmp file and then clean it up afterwards. It would be best to be able to pass the stringified JSON object directly to the
--policyoption. Try parsing it as a JSON, if it fails, try reading it as a file.This would significantly simplify the code and reduce the clutter.