forked from aws/aws-cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(spec2cdk): use modern type when building tag type (aws#29389)
### Issue # (if applicable) Closes aws#29388 ### Reason for this change Some of the modern tags failed to run `cdk synth` due to type misconfiguration. ### Description of changes Always default to use the latest type for modern tags. ### Description of how you validated changes Fixed for failed resources. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
Showing
3 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { Match, Template } from '../../assertions'; | ||
import * as iam from '../../aws-iam'; | ||
import * as kms from '../../aws-kms'; | ||
import { CfnParameter, Duration, Stack, App, Token, Tags } from '../../core'; | ||
import * as xray from '../lib'; | ||
|
||
/* eslint-disable quote-props */ | ||
|
||
test('able to add tags to XRay CfnGroup', () => { | ||
const stack = new Stack(); | ||
new xray.CfnGroup(stack, 'Group', { | ||
groupName: 'GroupName', | ||
tags: [{ | ||
key: 'Key', | ||
value: 'Value', | ||
}], | ||
}); | ||
|
||
Template.fromStack(stack).hasResourceProperties('AWS::XRay::Group', { | ||
Tags: [{ | ||
Key: 'Key', | ||
Value: 'Value', | ||
}], | ||
}); | ||
}); | ||
|
||
test('able to add tags through Tags.of()... to XRay CfnGroup', () => { | ||
const stack = new Stack(); | ||
new xray.CfnGroup(stack, 'Group', { | ||
groupName: 'GroupName', | ||
}); | ||
|
||
Tags.of(stack).add('Key', 'Value'); | ||
|
||
Template.fromStack(stack).hasResourceProperties('AWS::XRay::Group', { | ||
Tags: [{ | ||
Key: 'Key', | ||
Value: 'Value', | ||
}], | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters