-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] CfnMapping creates wrong mappings #9432
Labels
@aws-cdk/core
Related to core CDK functionality
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
needs-triage
This issue or PR still needs to be triaged.
p2
Comments
eladb
pushed a commit
that referenced
this issue
Aug 5, 2020
Add the synthesized template output as an example to make sure it's clear that `CfnMapping` represents a single mapping entry and not the entire `Mappings` section in the template. Fixes #9432
Each The import * as cdk from '@aws-cdk/core';
export class CDKStack extends cdk.Stack {
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);
new cdk.CfnMapping(this, 'Map1', {
mapping: {
This: {
One: 'Yes'
}
}
});
new cdk.CfnMapping(this, 'Map'2, {
mapping: {
Hello: 'world'
}
});
}
} Will yield: {
"Mappings": {
"Map1": {
"This": {
"One": "Yes"
}
},
"Map2": {
"Hello": "World"
}
}
} I've created a PR to update the docs to make it a bit clearer: #9451 |
mergify bot
pushed a commit
that referenced
this issue
Aug 5, 2020
Add the synthesized template output as an example to make sure it's clear that `CfnMapping` represents a single mapping entry and not the entire `Mappings` section in the template. Fixes #9432 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
eladb
pushed a commit
that referenced
this issue
Aug 10, 2020
Add the synthesized template output as an example to make sure it's clear that `CfnMapping` represents a single mapping entry and not the entire `Mappings` section in the template. Fixes #9432 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
curtiseppel
pushed a commit
to curtiseppel/aws-cdk
that referenced
this issue
Aug 11, 2020
Add the synthesized template output as an example to make sure it's clear that `CfnMapping` represents a single mapping entry and not the entire `Mappings` section in the template. Fixes aws#9432 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@aws-cdk/core
Related to core CDK functionality
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
needs-triage
This issue or PR still needs to be triaged.
p2
CfnMapping creates wrong CFN mappings. It should not add
Mappings
twice.Please let me know if any other information is needed or I did something wrong.
Reproduction Steps
With that code, when I
cdk synth --asset-metadata false --path-metadata false --version-reporting false --json true
, it created wrong mappings.What did you expect to happen?
What actually happened?
Environment
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: