Sha256: 489d2b146b92af1bf28cefa0b8b2e0aa1898db549fcd42de7c12bd374a271350

Contents?: true

Size: 601 Bytes

Versions: 34

Compression:

Stored size: 601 Bytes

Contents

module Kontena::Cli::Vault
  class WriteCommand < Kontena::Command
    include Kontena::Cli::Common
    include Kontena::Cli::GridOptions

    parameter 'NAME', 'Secret name'
    parameter '[VALUE]', 'Secret value (default: STDIN)'

    option '--silent', :flag, "Reduce output verbosity"

    requires_current_master

    def default_value
      stdin_input("Enter value for secret '#{name}'", :mask)
    end

    def execute
      vspinner "Writing #{pastel.cyan(name)} to the vault " do
        client.post("grids/#{current_grid}/secrets", { name: name, value: value })
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
krates-1.6.1 lib/kontena/cli/vault/write_command.rb
krates-1.6.0 lib/kontena/cli/vault/write_command.rb
kontena-cli-1.5.4 lib/kontena/cli/vault/write_command.rb
kontena-cli-1.5.4.rc1 lib/kontena/cli/vault/write_command.rb
kontena-cli-1.5.3 lib/kontena/cli/vault/write_command.rb
kontena-cli-1.5.2 lib/kontena/cli/vault/write_command.rb
kontena-cli-1.5.1 lib/kontena/cli/vault/write_command.rb
kontena-cli-1.5.0 lib/kontena/cli/vault/write_command.rb
kontena-cli-1.5.0.rc1 lib/kontena/cli/vault/write_command.rb
kontena-cli-1.5.0.pre5 lib/kontena/cli/vault/write_command.rb
kontena-cli-1.5.0.pre4 lib/kontena/cli/vault/write_command.rb
kontena-cli-1.5.0.pre3 lib/kontena/cli/vault/write_command.rb
kontena-cli-1.5.0.pre2 lib/kontena/cli/vault/write_command.rb
kontena-cli-1.5.0.pre1 lib/kontena/cli/vault/write_command.rb