cloudtools/stacker

Update of a Raw Blueprint with Transform fails

Closed this issue · 2 comments

Hi,

I believe I have discovered a bug in Stacker. The bug seems to be triggered by trying to update a raw template which uses Transforms. I'm using master at the time of this report (d1353b3) with python 3.6.5 on macOS 10.13.6. Stacker is installed in a virtualenv.

Config to reproduce:
config.yaml:

---
namespace: 'whatever'
stacks:
    - name: 'dummy'
      template_path: dummy.json

dummy.json:

{
    "Transform": "AWS::Serverless-2016-10-31",
    "Resources": {
        "DummyParameter": {
            "Type": "AWS::SSM::Parameter",
            "Properties": {
                "Type": "String",
                "Value": "foobar"
            }
        }
    }
}

Steps to reproduce: run build twice:

% stacker build config.yml
[2018-08-28T15:56:44] Using default AWS provider mode
[2018-08-28T15:56:50] dummy: submitted (creating new stack)
[2018-08-28T15:57:20] dummy: complete (creating new stack)
% stacker build config.yml
[2018-08-28T16:00:56] Using default AWS provider mode
[2018-08-28T16:00:57] create_change_set() got an unexpected keyword argument 'stack_policy'
Traceback (most recent call last):
  File "<stripped>/stacker/venv/lib/python3.6/site-packages/stacker/plan.py", line 93, in _run_once
    status = self.fn(self.stack, status=self.status)
  File "<stripped>/stacker/venv/lib/python3.6/site-packages/stacker/actions/build.py", line 353, in _launch_stack
    stack_policy=stack_policy,
  File "<stripped>/stacker/venv/lib/python3.6/site-packages/stacker/providers/aws/default.py", line 805, in update_stack
    stack_policy=stack_policy, **kwargs)
  File "<stripped>/stacker/venv/lib/python3.6/site-packages/stacker/providers/aws/default.py", line 891, in noninteractive_changeset_update
    'UPDATE', service_role=self.service_role, **kwargs
TypeError: create_change_set() got an unexpected keyword argument 'stack_policy'
[2018-08-28T16:00:57] dummy: failed (create_change_set() got an unexpected keyword argument 'stack_policy')
[2018-08-28T16:00:57] The following steps failed: dummy

Thanks for the bug @nielslaukens - it looks like this might have been in here since we added the ability to use stack policies. I've gone ahead and fixed it in #657.

I can confirm that this issue is solved in branch fix_stack_policy_non_interactive_changesets (#657)