Sha256: 45d3b9add2ebbe040be80a376b1cd9bccf6d0e48c8d44e64c877d2d89792ed59

Contents?: true

Size: 404 Bytes

Versions: 3

Compression:

Stored size: 404 Bytes

Contents

module Hashicorptools
  module Variables
    def aws_credentials_settings(settings_overrides = {})
      {aws_access_key: ENV['AWS_ACCESS_KEY_ID'],
       aws_secret_key: ENV['AWS_SECRET_ACCESS_KEY']}.merge(settings_overrides)
    end

    def variables(settings_overrides = {})
      aws_credentials_settings(settings_overrides).collect{|key,value| "-var '#{key}=#{value}'" }.join(' ')
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hashicorptools-0.0.5 lib/hashicorptools/variables.rb
hashicorptools-0.0.4 lib/hashicorptools/variables.rb
hashicorptools-0.0.3 lib/hashicorptools/variables.rb