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:
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
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