Open damianw2 opened 5 years ago
When I try to parse azure terraform state file, i'm getting below error:
PS C:\Users\dawy\Documents\Terraform\SimpleInspecExample> inspec terraform generate -n generated_from_tf --debug [2019-08-15T12:46:56+02:00] DEBUG: Iggy::FileHelper.parse_json file = terraform.tfstate Traceback (most recent call last): 15: from C:/Program Files/inspec/inspec/bin/inspec:187:in `<main>' 14: from C:/Program Files/inspec/inspec/bin/inspec:187:in `load' 13: from C:/Program Files/inspec/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-bin-4.11.3/bin/inspec:11:in `<top (required)>' 12: from C:/Program Files/inspec/inspec/embedded/lib/ruby/gems/2.6.0/gems/inspec-4.11.3/lib/inspec/base_cli.rb:33:in `start' 11: from C:/Program Files/inspec/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start' 10: from C:/Program Files/inspec/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch' 9: from C:/Program Files/inspec/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command' 8: from C:/Program Files/inspec/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run' 7: from C:/Program Files/inspec/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:238:in `block in subcommand' 6: from C:/Program Files/inspec/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:115:in `invoke' 5: from C:/Program Files/inspec/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch' 4: from C:/Program Files/inspec/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command' 3: from C:/Program Files/inspec/inspec/embedded/lib/ruby/gems/2.6.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run' 2: from C:/Users/dawy/.inspec/gems/2.6.0/gems/inspec-iggy-0.6.0/lib/inspec-iggy/terraform/cli_command.rb:90:in `generate' 1: from C:/Users/dawy/.inspec/gems/2.6.0/gems/inspec-iggy-0.6.0/lib/inspec-iggy/terraform/generate.rb:20:in `parse_generate' C:/Users/dawy/.inspec/gems/2.6.0/gems/inspec-iggy-0.6.0/lib/inspec-iggy/terraform/generate.rb:33:in `parse_resources': undefined method `each' for nil:NilClass (NoMethodError)
terraform --version Terraform v0.12.6 + provider.azurerm v1.32.1 + provider.random v2.2.0
inspec --version 4.11.3
I haven't tested with Terraform 0.12 yet, but I'm hoping to get to that shortly.
When I try to parse azure terraform state file, i'm getting below error: