How to prevent retiring a specific VM?

How to prevent an user to retire a specific VM?

We want a user be able to retire anything BUT a specific vm,

that means, if he goes in the UI to lifecycle/retire a vm, CF/MIQ should prevent him to do it.

@gmccullough @tinaafitz Can you help here?

You can in automate do a check on retire method and if the selected machine is the one you don’t want to delete, just stop the retire process.
Not sure if you can use right access for this

This could be handled from the automate state-machine but there is no logic behind the button to hide it in certain conditions.

For the automate case I would imagine that you tag the VM and then check for that tag at that the beginning of the retirement state-machine and exit the process.

In the gaprindashvili branch and upstream code base you could do something difference. We now support conditions on custom buttons. You would need to hide the real UI button and replace it with a custom button that could use a condition to show/hide the button on a specific VM.