Closed
Description
This error can be reproduced by:
- 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
- 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
- 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
Labels
No labels