stacker icon indicating copy to clipboard operation
stacker copied to clipboard

xref in parameters fails with KeyError

Open discobean opened this issue 8 years ago • 6 comments

Hi guys, I've run into an issue when using xref:

$ stacker diff -r ap-southeast-2 env/x.env conf/x.yaml 
[2017-02-17T16:15:48] Using Default AWS Provider
Traceback (most recent call last):
  File "/usr/local/bin/stacker", line 9, in <module>
    args.run(args)
  File "/Library/Python/2.7/site-packages/stacker/commands/stacker/diff.py", line 32, in run
    action.execute()
  File "/Library/Python/2.7/site-packages/stacker/actions/base.py", line 122, in execute
    self.run(*args, **kwargs)
  File "/Library/Python/2.7/site-packages/stacker/actions/diff.py", line 199, in run
    plan = self._generate_plan()
  File "/Library/Python/2.7/site-packages/stacker/actions/diff.py", line 192, in _generate_plan
    stacks[stack_name],
KeyError: 's-${xref p-vpc'

This is when the xref is defined as ${xref p-vpc::VpcId}. If I remove the :: it parses and does diff but obviously it doesn't pickup any values.

discobean avatar Feb 17 '17 05:02 discobean

It looks like this happens only when using ${xref} in a parameter - when using it in variables it works fine.

discobean avatar Mar 03 '17 00:03 discobean

@discobean What version of stacker are you using? Can you share the relevant parts of the config & blueprint when it breaks? Thanks!

phobologic avatar Mar 04 '17 21:03 phobologic

ping @discobean - this still an issue with 1.0? If so, can you provide the relevant parts of config/blueprint? Thanks again!

phobologic avatar Mar 17 '17 04:03 phobologic

I'll have a look - I've been migrating our parameters to variables anyway so not that big of a deal for me now.

discobean avatar Mar 19 '17 23:03 discobean

Thanks @discobean!

phobologic avatar Mar 20 '17 01:03 phobologic

Hey @discobean - have you been able to reproduce this in 1.0?

phobologic avatar Jul 06 '17 23:07 phobologic