brandonhilkert/fucking_shell_scripts

`fetch': key not found: :region (KeyError)

Closed this issue · 1 comments

Hi,

I've just installed FSS and am testing it out and am getting the following error when trying to build/configure a server:

/home/daniel/.gem/ruby/gems/fucking_shell_scripts-0.99/lib/fucking_shell_scripts/connection.rb:22:in `fetch': key not found: :region (KeyError)
    from /home/daniel/.gem/ruby/gems/fucking_shell_scripts-0.99/lib/fucking_shell_scripts/connection.rb:22:in `connection'
    from /home/daniel/.gem/ruby/gems/fucking_shell_scripts-0.99/lib/fucking_shell_scripts/cli.rb:28:in `connection'
    from /home/daniel/.gem/ruby/gems/fucking_shell_scripts-0.99/lib/fucking_shell_scripts/cli.rb:24:in `server'
    from /home/daniel/.gem/ruby/gems/fucking_shell_scripts-0.99/lib/fucking_shell_scripts/cli.rb:10:in `bootstrap'
    from /home/daniel/.gem/ruby/gems/fucking_shell_scripts-0.99/bin/fss:44:in `<top (required)>'
    from /home/daniel/bin/fss:23:in `load'
    from /home/daniel/bin/fss:23:in `<main>'

This is my defaults.yml:

# servers/defaults.yml

################################
# This file defines our defaults
################################

security_groups: web-sg
size: t1.micro
image: ami-abcd1234
availability_zone: us-west-1a
key_name: private_key
cloud:
  provider: AWS
  aws_access_key_id: <=% ENV['AWS_ACCESS_KEY'] %>
  aws_secret_access_key: <%= ENV['AWS_SECRET_ACCESS_KEY'] %>
  region: us-west-1

and this is test.yml:

instance_type: t1.micro
availability_zone: us-west-1a
region: us-west-1
name: test
private_key_path: /home/daniel/.ssh/private_keys/private_key.pem

files:
  - files/test.txt

scripts:
  - scripts/ls.sh

I've found a workaround by hard-coding (or having an environment variable) a region in connection.rb, but this isn't ideal.

Any help would be greatly appreciated.

Thanks!

Turns out, I tried to edit files to get the VPC Support happening (from #18) which led me to get this error. Hopefully that's due to me messing something up and not that pull request.

I reinstalled this (gem uninstall fucking_shell_scripts + gem install fucking_shell_scripts) and all seems to be working fine.