aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

Change CFN behavior when there are two output elements of the same name and affected by conditions.

Open
#478 5 comments 0 reactions 0 assignees View on GitHub
bug? enhancement
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

1. Title -> Change CFN behavior when there are two output elements of the same name and affected by conditions.

2. Scope of request -> Currently two outputs like:
```
"Output1" : {
"Condition" : "IsCondition",
"Value" : "SomeValue"
},
"Output1" : {
"Condition" : "IsNotCondition,
"Value" : "OtherValue"
}
```
No output is created.
3. Expected behavior -> The expected behavior would be that if more than one output by the same name is defined AFTER conditions as applied, then an error should be produced, and if only one resulted, that would be the one being created.
We try to use this scheme to have a template produce different outputs depending on a condition that affected the resources that got created.
We work around this issue using exports with the same name in two outputs of different names, but in some scenarios, such as when using Terraform data sources, the output name is what gets exposed and would need to be the same.
In any case, the behavior of not producing any error but silently missing the output, creates errors further down the deployment pipeline that are harder to diagnose.

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.