Class: OpsWorks::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/opsworks/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/opsworks/config.rb', line 11

def initialize
  ini = IniFile.load(ENV["AWS_CONFIG_FILE"])

  aws_config = ini['default']
  AWS.config(
    access_key_id: aws_config["aws_access_key_id"],
    secret_access_key: aws_config["aws_secret_access_key"],
  )

  @stack_id = ini['opsworks']['stack-id']
  @ssh_user_name = ini['opsworks']['ssh-user-name']
end

Instance Attribute Details

#ssh_user_nameObject (readonly)

Returns the value of attribute ssh_user_name.



9
10
11
# File 'lib/opsworks/config.rb', line 9

def ssh_user_name
  @ssh_user_name
end

#stack_idObject (readonly)

Returns the value of attribute stack_id.



9
10
11
# File 'lib/opsworks/config.rb', line 9

def stack_id
  @stack_id
end