Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cannot destroy individual stack with requires #384

@sdechgan

Description

@sdechgan

I cannot destroy an individual stack that is required by another stack

For example:

Here is my stacker.yml

stacks:
  - name: stack1
    class_path: blueprints.application.Application
    enabled: true
  - name: stack2
    class_path: blueprints.s3.Event
    enabled: true
    requires:
      - stack1
  - name: stack3
    class_path: blueprints.api.OpenApi
    enabled: true
    requires:
      - stack1
      - stack2

Here is my command

stacker destroy --stacks stack3  environments/dev.env stack.yml

I get the following error:

[2017-05-12T14:53:29] Using Default AWS Provider
Traceback (most recent call last):
  File "~/.pyenv/bin/stacker", line 9, in <module>
    args.run(args)
  File "~/.pyenv/lib/python2.7/site-packages/stacker/commands/stacker/destroy.py", line 35, in run
    action.execute(force=options.force, tail=options.tail)
  File "~/.pyenv/lib/python2.7/site-packages/stacker/actions/base.py", line 124, in execute
    self.run(*args, **kwargs)
  File "~/.pyenv/lib/python2.7/site-packages/stacker/actions/destroy.py", line 100, in run
    plan = self._generate_plan(tail=tail)
  File "~/.pyenv/lib/python2.7/site-packages/stacker/actions/destroy.py", line 56, in _generate_plan
    stacks_dict[stack_name],
KeyError: 'dev-stack2'

Isn't that the correct command to delete an individual stack?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions