mattray / inspec-iggy

InSpec CLI plugin for generating compliance controls from Terraform and CloudFormation
Apache License 2.0
106 stars 18 forks source link

need a better message when terraform.tfstate not found #36

Open mattray opened 4 years ago

mattray commented 4 years ago
Traceback (most recent call last):
    16: from /usr/local/bin/inspec:203:in `<main>'
    15: from /usr/local/bin/inspec:203:in `load'
    14: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-bin-4.18.82/bin/inspec:11:in `<top (required)>'
    13: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-core-4.18.82/lib/inspec/base_cli.rb:35:in `start'
    12: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
    11: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
    10: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
     9: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
     8: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:238:in `block in subcommand'
     7: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:115:in `invoke'
     6: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
     5: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
     4: from /opt/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
     3: from /Users/mattray/ws/inspec-iggy/lib/inspec-iggy/terraform/cli_command.rb:83:in `generate'
     2: from /Users/mattray/ws/inspec-iggy/lib/inspec-iggy/terraform/generate.rb:15:in `parse_generate'
     1: from /Users/mattray/ws/inspec-iggy/lib/inspec-iggy/file_helper.rb:12:in `parse_json'
/Users/mattray/ws/inspec-iggy/lib/inspec-iggy/file_helper.rb:31:in `fetch': private method `open' called for #<URI::Generic terraform.tfstate> (NoMethodError)