Sha256: 3ed561de571bcf77ba02f702074789418d2669a37a45a2dce6d83b26e16b7cdd

Contents?: true

Size: 584 Bytes

Versions: 2

Compression:

Stored size: 584 Bytes

Contents

require "base64"

module TerraspacePluginAzurerm::Interfaces::Helper
  class Secret
    extend Memoist
    include TerraspacePluginAzurerm::Logging
    include TerraspacePluginAzurerm::Clients::Options

    def initialize(mod, options={})
      @mod, @options = mod, options
      @base64 = options[:base64]
    end

    # opts: version, vault
    def fetch(name, opts={})
      value = fetcher.fetch(name, opts)
      value = Base64.strict_encode64(value).strip if @base64
      value
    end

    def fetcher
      Fetcher.new(@mod, @options)
    end
    memoize :fetcher
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
terraspace_plugin_azurerm-0.4.0 lib/terraspace_plugin_azurerm/interfaces/helper/secret.rb
terraspace_plugin_azurerm-0.3.3 lib/terraspace_plugin_azurerm/interfaces/helper/secret.rb