Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

tfstate': undefined method #466

Open
Arunkaliappan118 opened this issue May 26, 2019 · 2 comments
Open

tfstate': undefined method #466

Arunkaliappan118 opened this issue May 26, 2019 · 2 comments

Comments

@Arunkaliappan118
Copy link

Arunkaliappan118 commented May 26, 2019

I have installed Terraform v0.12.0. I am trying to merge new tfstate file to the existing one. When I execute the command " terraforming alb --tfstate --merge=terraform.tfstate" I am getting below error.

C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/terraforming-0.17.0/lib/terraforming/cli.rb:264:in tfstate': undefined method []' for nil:NilClass (NoMethodError)
from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/terraforming-0.17.0/lib/terraforming/cli.rb:245:in execute' from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/terraforming-0.17.0/lib/terraforming/cli.rb:15:in alb'
from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in run' from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in invoke_command'
from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in dispatch' from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/base.rb:466:in start'
from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/terraforming-0.17.0/bin/terraforming:5:in <top (required)>' from C:/Ruby25-x64/bin/terraforming:23:in load'
from C:/Ruby25-x64/bin/terraforming:23:in `

'

Thanks!!

@ayush--s
Copy link

› terraforming ec2 --tfstate --merge=terraform.tfstate --region=ap-southeast-1 --overwrite
/Users/ayush/.gem/ruby/2.3.0/gems/terraforming-0.18.0/lib/terraforming/cli.rb:269:in `tfstate': undefined method `[]' for nil:NilClass (NoMethodError)
	from /Users/ayush/.gem/ruby/2.3.0/gems/terraforming-0.18.0/lib/terraforming/cli.rb:250:in `execute'
	from /Users/ayush/.gem/ruby/2.3.0/gems/terraforming-0.18.0/lib/terraforming/cli.rb:50:in `ec2'
	from /Users/ayush/.gem/ruby/2.3.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run'
	from /Users/ayush/.gem/ruby/2.3.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command'
	from /Users/ayush/.gem/ruby/2.3.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch'
	from /Users/ayush/.gem/ruby/2.3.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start'
	from /Users/ayush/.gem/ruby/2.3.0/gems/terraforming-0.18.0/bin/terraforming:5:in `<top (required)>'
	from /Users/ayush/.gem/ruby/2.3.0/bin/terraforming:23:in `load'
	from /Users/ayush/.gem/ruby/2.3.0/bin/terraforming:23:in `<main>'

@ananthkumarb
Copy link

I am getting the same error. Any update on this?

/var/lib/gems/2.7.0/gems/multi_json-1.12.2/lib/multi_json/options_cache.rb:12: warning: Capturing the given block using Proc.new is deprecated; use &block instead
Traceback (most recent call last):
9: from /usr/local/bin/terraforming:23:in <main>' 8: from /usr/local/bin/terraforming:23:in load'
7: from /var/lib/gems/2.7.0/gems/terraforming-0.18.0/bin/terraforming:5:in <top (required)>' 6: from /var/lib/gems/2.7.0/gems/thor-1.0.1/lib/thor/base.rb:485:in start'
5: from /var/lib/gems/2.7.0/gems/thor-1.0.1/lib/thor.rb:392:in dispatch' 4: from /var/lib/gems/2.7.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in invoke_command'
3: from /var/lib/gems/2.7.0/gems/thor-1.0.1/lib/thor/command.rb:27:in run' 2: from /var/lib/gems/2.7.0/gems/terraforming-0.18.0/lib/terraforming/cli.rb:50:in ec2'
1: from /var/lib/gems/2.7.0/gems/terraforming-0.18.0/lib/terraforming/cli.rb:250:in execute' /var/lib/gems/2.7.0/gems/terraforming-0.18.0/lib/terraforming/cli.rb:269:in tfstate': undefined method `[]' for nil:NilClass (NoMethodError)

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

3 participants