lib/conjur/command/variables.rb in conjur-cli-4.14.0 vs lib/conjur/command/variables.rb in conjur-cli-4.15.0

- old
+ new

@@ -63,9 +63,26 @@ id = require_arg(args, 'id') display(api.variable(id), options) end end + var.desc "Decommission a variable" + var.arg_name "id" + var.command :retire do |c| + c.action do |global_options,options,args| + id = require_arg(args, 'id') + + variable = api.variable(id) + + retire_resource variable + + puts "Giving ownership to 'attic'" + variable.resource.give_to api.user('attic') + + puts "Variable retired" + end + end + var.desc "List variables" var.command :list do |c| command_options_for_list c c.action do |global_options, options, args|