Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

Can't parse azure terraform state #29

Open
damianw2 opened this issue Aug 15, 2019 · 1 comment
Open

Can't parse azure terraform state #29

damianw2 opened this issue Aug 15, 2019 · 1 comment

Comments

@damianw2
Copy link

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
@mattray
Copy link
Owner

mattray commented Aug 15, 2019

I haven't tested with Terraform 0.12 yet, but I'm hoping to get to that shortly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants