Class: TerraspacePluginAzurerm::Interfaces::Helper::Secret
- Inherits:
-
Object
- Object
- TerraspacePluginAzurerm::Interfaces::Helper::Secret
- Extended by:
- Memoist
- Includes:
- Logging
- Defined in:
- lib/terraspace_plugin_azurerm/interfaces/helper/secret.rb,
lib/terraspace_plugin_azurerm/interfaces/helper/secret/fetcher.rb
Defined Under Namespace
Classes: Fetcher
Instance Method Summary collapse
-
#fetch(name, opts = {}) ⇒ Object
opts: version, vault.
- #fetcher ⇒ Object
-
#initialize(mod, options = {}) ⇒ Secret
constructor
A new instance of Secret.
Methods included from Logging
Constructor Details
#initialize(mod, options = {}) ⇒ Secret
Returns a new instance of Secret.
8 9 10 11 |
# File 'lib/terraspace_plugin_azurerm/interfaces/helper/secret.rb', line 8 def initialize(mod, ={}) @mod, @options = mod, @base64 = [:base64] end |
Instance Method Details
#fetch(name, opts = {}) ⇒ Object
opts: version, vault
14 15 16 17 18 |
# File 'lib/terraspace_plugin_azurerm/interfaces/helper/secret.rb', line 14 def fetch(name, opts={}) value = fetcher.fetch(name, opts) value = Base64.strict_encode64(value).strip if @base64 value end |