8000 1.4 Regression: stacktrace during deploy w/ changeset and UsePreviousValue parameters · Issue #643 · cloudtools/stacker · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
1.4 Regression: stacktrace during deploy w/ changeset and UsePreviousValue parameters #643
Closed
@troyready

Description

@troyready

This error can be reproduced by:

  1. Deploying the following stack:
AWSTemplateFormatVersion: '2010-09-09'

Parameters:
  ServiceNameOne:
    Description: Service name
    Default: logs.us-west-2.amazonaws.com
    Type: String

Resources:
  RoleOne:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Action: 'sts:AssumeRole'
            Principal:
              Service:
                - !Ref ServiceNameOne

with this config:

namespace: stackertesting
stacker_bucket: ""

stacks:
  teststack:
    template_path: templatefile.yaml
  1. Update the template and config to the following:
AWSTemplateFormatVersion: '2010-09-09'

Parameters:
  ServiceNameOne:
    Description: Service name
    Default: logs.us-west-2.amazonaws.com
    Type: String
  ServiceNameTwo:
    Description: Service name
    Type: String

Resources:
  RoleOne:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Action: 'sts:AssumeRole'
            Principal:
              Service:
                - !Ref ServiceNameOne

  RoleTwo:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Version: '2012-10-17'
        Statement:
          - Effect: Allow
            Action: 'sts:AssumeRole'
            Principal:
              Service:
                - !Ref ServiceNameTwo
namespace: stackertesting
stacker_bucket: ""

stacks:
  teststack:
    template_path: templatefile.yaml
    variables:
      ServiceNameTwo: logs.us-west-2.amazonaws.com
  1. Deploy the updated stack interactively:
 $ stacker build -i -r us-west-2 config.yaml 
[2018-08-07T15:45:47] Using interactive AWS provider mode.
[2018-08-07T15:45:49] 'ParameterValue'
Traceback (most recent call last):
  File "/home/troyready/.local/lib/python3.6/site-packages/stacker/plan.py", line 93, in _run_once
    status = self.fn(self.stack, status=self.status)
  File "/home/troyready/.local/lib/python3.6/site-packages/stacker/actions/build.py", line 353, in _launch_stack
    stack_policy=stack_policy,
  File "/home/troyready/.local/lib/python3.6/site-packages/stacker/providers/aws/default.py", line 805, in update_stack
    stack_policy=stack_policy, **kwargs)
  File "/home/troyready/.local/lib/python3.6/site-packages/stacker/providers/aws/default.py", line 830, in interactive_update_stack
    self.params_as_dict(parameters))
  File "/home/troyready/.local/lib/python3.6/site-packages/stacker/providers/aws/default.py", line 970, in params_as_dict
    parameters[p['ParameterKey']] = p['ParameterValue']
KeyError: 'ParameterValue'
[2018-08-07T15:45:49] teststack: failed ('ParameterValue')
[2018-08-07T15:45:49] The following steps failed: teststack

The failure is occurring because the new parameters variable contains the following:

[{'ParameterKey': 'ServiceNameTwo', 'ParameterValue': 'logs.us-west-2.amazonaws.com'}, {'ParameterKey': 'ServiceNameOne', 'UsePreviousValue': True}]

(UsePreviousValue instead of ParameterValue)

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

      0