aws / aws/aws-cli

cloudformation deploy references incorrect format for CodePipeline style parameters

Open
#6,907 3 comments 1 reaction 0 assignees View on GitHub
bug cloudformation package-deploy documentation p2
Dominant language
Python
Stars
17.3k
Forks
4.6k
Avg merge
1d 2h
Merged PRs (30d)
13

Description

### Describe the bug

The documentation for the cloudformation deploy subcommand references invalid JSON when describing the CodePipeline style overrides. At present, the docs reference this JSON construct:

```json
[
"Parameters": {
"Key1": "Value1",
"Key2": "Value2"
}
]
```
This is not valid JSON, as the root element is an array.
The correct construct for this (validated with a minimal log group template) is:
```json
{
"Parameters": {
"Key1": "Value1",
"Key2": "Value2"
}
}
```

### Expected Behavior

I expected that following the provided documentation would result in a CloudFormation stack being deployed.

### Current Behavior

Passing parameters as described in the docs results in an immediate error

### Reproduction Steps

Template:
```yaml
AWSTemplateFormatVersion: "2010-09-09"

Description: Simple template

Parameters:
pGroupName:
Type: String

Resources:
rLogGroup:
Type: AWS::Logs::LogGroup
Properties:
LogGroupName: !Ref pGroupName
```

Parameters (per docs):
```json
[
"Parameters": {
"pGroupName": "InnocuousLogGroup"
}
]
```

Results:
```unix
aws cloudformation deploy --stack-name cp-format-validation --template-file mintemplate.yaml --parameter-overrides file://parameters-fixed.json

Expecting property name enclosed in double quotes: line 4 column 5 (char 69)
```

### Possible Solution

_No response_

### Additional Information/Context

_No response_

### CLI version used

aws-cli/2.6.0 Python/3.9.12 Darwin/20.6.0 source/arm64 prompt/off

### Environment details (OS name and version, etc.)

macOS 11.6.5

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.