I receive the following error when I attempt to create or update a stack using the CloudFormationCreateOrUpdateStack@1 task and specifying a template parameters file:
Loading template parameters file '/home/vsts/work/1/a/CloudFormation/parameters/parameters.dev.json'
##[debug]Attempting parse as json content
##[debug]Successfully parsed template parameters
Successfully loaded template parameters
Setting capability CAPABILITY_IAM for stack
Setting capability CAPABILITY_NAMED_IAM for stack
Adding tag. Key 'key1', Value 'value1'
Adding tag. Key 'key2', Value 'value2'
Adding tag. Key 'application', Value 'pipeline-poc'
Adding tag. Key 'environment', Value 'dev'
##[debug]AWS updateStack request ID: undefined
Stack update request failed with error: 'Expected params.Parameters to be an Array' { InvalidParameterType: Expected params.Parameters to be an Array
##[debug]task result: Failed
at constructor.fail (/home/vsts/work/_tasks/CloudFormationCreateOrUpdateStack_7ef7cdfa-aa45-42c5-93c8-d7603643dd99/1.14.0/CloudFormationCreateOrUpdateStack.js:29:201)
at constructor.validateType (/home/vsts/work/_tasks/CloudFormationCreateOrUpdateStack_7ef7cdfa-aa45-42c5-93c8-d7603643dd99/1.14.0/CloudFormationCreateOrUpdateStack.js:29:3508)
##[error]InvalidParameterType: Expected params.Parameters to be an Array
##[debug]Processed: ##vso[task.issue type=error;]InvalidParameterType: Expected params.Parameters to be an Array
at constructor.validateList (/home/vsts/work/_tasks/CloudFormationCreateOrUpdateStack_7ef7cdfa-aa45-42c5-93c8-d7603643dd99/1.14.0/CloudFormationCreateOrUpdateStack.js:29:975)
at constructor.validateMember (/home/vsts/work/_tasks/CloudFormationCreateOrUpdateStack_7ef7cdfa-aa45-42c5-93c8-d7603643dd99/1.14.0/CloudFormationCreateOrUpdateStack.js:29:833)
at constructor.validateStructure (/home/vsts/work/_tasks/CloudFormationCreateOrUpdateStack_7ef7cdfa-aa45-42c5-93c8-d7603643dd99/1.14.0/CloudFormationCreateOrUpdateStack.js:29:595)
at constructor.validateMember (/home/vsts/work/_tasks/CloudFormationCreateOrUpdateStack_7ef7cdfa-aa45-42c5-93c8-d7603643dd99/1.14.0/CloudFormationCreateOrUpdateStack.js:29:785)
at constructor.validate (/home/vsts/work/_tasks/CloudFormationCreateOrUpdateStack_7ef7cdfa-aa45-42c5-93c8-d7603643dd99/1.14.0/CloudFormationCreateOrUpdateStack.js:27:3483)
at constructor.<anonymous> (/home/vsts/work/_tasks/CloudFormationCreateOrUpdateStack_7ef7cdfa-aa45-42c5-93c8-d7603643dd99/1.14.0/CloudFormationCreateOrUpdateStack.js:16:115446)
at constructor.callListeners (/home/vsts/work/_tasks/CloudFormationCreateOrUpdateStack_7ef7cdfa-aa45-42c5-93c8-d7603643dd99/1.14.0/CloudFormationCreateOrUpdateStack.js:16:86263)
at p (/home/vsts/work/_tasks/CloudFormationCreateOrUpdateStack_7ef7cdfa-aa45-42c5-93c8-d7603643dd99/1.14.0/CloudFormationCreateOrUpdateStack.js:16:86148)
message: 'Expected params.Parameters to be an Array',
code: 'InvalidParameterType',
time: 2024-06-21T19:28:38.573Z }
Create a pipeline that uses the CloudFormationCreateOrUpdateStack@1 task.
Specify a template parameters file, in addition to the template file, in the task's inputs.
Execute the task.
Expected behavior
The CloudFormationCreateOrUpdateStack@1 passes along the parameters as defined in the template parameters file and successfully creates or updates the stack.
Describe the bug
I receive the following error when I attempt to create or update a stack using the CloudFormationCreateOrUpdateStack@1 task and specifying a template parameters file:
Here is the task's definition:
Here are the contents of
parameters.dev.json
, formatted according to the task's documentation:I have also tried the other two parameter formats that are provided in the AWS CLI documentation:
All three formats seem to be supported by the AWS CLI but error out in Azure DevOps.
When I attempt to use the exact same parameters file with the AWS CLI, the deployment is successful and the parameters are applied:
To reproduce
Steps to reproduce the behavior:
Expected behavior
The CloudFormationCreateOrUpdateStack@1 passes along the parameters as defined in the template parameters file and successfully creates or updates the stack.
Your Environment