Module: Smash::CloudPowers::Auth

Extended by:
Zenv
Included in:
Smash::CloudPowers, AwsResources, Delegator
Defined in:
lib/cloud_powers/auth.rb

Class Method Summary collapse

Methods included from Zenv

env_vars, file_tree_search, i_vars, project_root, project_root=, system_vars, zfind

Methods included from Helper

#attr_map!, #called_from, #create_logger, #errors, #format_error_message, #log_file, #logger, #smart_retry, #task_path, #task_require_path, #to_camel, #to_i_var, #to_pascal, #to_ruby_file_name, #to_snake, #update_message_body, #valid_json?

Class Method Details

.creds ⇒ Object

This method is able to be called before an object is instantiated in order to provide an Aws::Credentials object that will allow access to all the resources in the account that zfind searches for, using the "ACCOUNT_NUMBER" key.



20
21
22
23
24
25
# File 'lib/cloud_powers/auth.rb', line 20

def self.creds
  @creds ||= Aws::Credentials.new(
    zfind(:aws_access_key_id),
    zfind(:aws_secret_access_key)
  )
end

.region ⇒ Object

This method is able to be called before an object is instantiated in order to provide a region in AWS-land.



12
13
14
# File 'lib/cloud_powers/auth.rb', line 12

def self.region
  zfind(:aws_region) || 'us-west-2'
end