Skip to content

cdk deploy: show outputs descriptions in --outputs-file output #33364

Open
@saste

Description

@saste

Describe the feature

Currently, the cdk deploy --outputs-file outputs.json option enables writing the generated outputs to a file, in the format:

{ STACK_NAME: { KEY: VALUE } }

The information related to the description of the stack outputs items is lost.

It would be useful to keep this information, for example to auto-generate an UI starting from the outputs.

To do this, I suggest to extend the interface with another option, for example cdk deploy --outputs-file outputs.json --outputs-file-with-descriptions, generating the format:

{ STACK_NAME: [ {"key": KEY, "value": VALUE, "description": DESCRIPTION} ] }

In other words, each stack should contain a list of dictionaries with the key/value/description fields.

Currently it is not possible to get the description information, if not looking up in the cloudformation.

Use Case

The description field would be useful to convey the information of each output items in a human readable format.

For example you might use it to auto-generate a UI (either textual or graphical).

Currently it is possible to achieve this by querying cloudformation, but this implies more operations while this information should be already available when the outputs file is generated in the first place.

Proposed Solution

I suggest to extend the cdk deploy CLI with some new option.

It might either be:

cdk deploy --outputs-file outputs.json --outputs-file-with-descriptions

or:

cdk deploy --outputs-file outputs.json --outputs-file-mode include-descriptions

probably the latter being more extensible.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.178

Environment details (OS name and version, etc.)

not relevant since it is OS independent

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-cloudformationRelated to AWS CloudFormation@aws-cdk/coreRelated to core CDK functionalitycliIssues related to the CDK CLIfeature-requestA feature should be added or improved.p3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions