Comment 4 for bug 1851694

Revision history for this message
Anastasia (anastasia-macmood) wrote :

I see...
We have talked about potentially adding a behavior to our 'update-*' command to also cater for 'add-*' or 'update-*' scenario. At this stage, we are thinking it's best provided via an additional option. Something along the line of:

'juju update-credential <cloud> <credential_name> --force-add'

The argument was that the notions of 'insert' and 'upsert' are fairly useful in databases. So Juju CRUD should allow for similar flexibility.

We do not want to lose the ability to err out when users are trying to 'add' something that already exists. So we did not want to change the behavior of 'add-*' commands.

We also do not want to lose the ability to err out when users are trying to update something that does not yet exist. So we did not want to change the default behavior of 'update-*' commands. However, adding to that behavior sounds feasible and not conflicting.

This will address both your previous concern about similar ability originally provided by 'add-* --replace' as well as eliminate the need for parsing errors to get a 'thing' name :D