-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
(aws-dms): Tags.of(CfnReplicationConfig construct).add({...}) does not work #28862
Comments
I think the
|
@pahud my understanding with the L1 Construct that they are essentially generated from the cloudformation spec. So in the code you show above -- where did you find that? 😅 I noticed in the cloudformation spec a slight difference in how Tags is defined between the AWS::DMS::Endpoint type and the AWS::DMS::ReplicationConfig type. The ReplicationConfig Tags definition looks like this:
while the AWS::DMS::Endpoint looks like this:
Not sure if this is relevant, but it is as far as I was able to get to understanding why this is happening |
After investigation, the above schema mentioned above are both valid since tags formatted like This results in that |
…28989) ### Issue # (if applicable) Closes #28862 ### Reason for this change CFN resources that has array format `tags` cannot use `Tags.of()` to add tags. ### Description of changes Enable modern style tags `ITaggableV2` ### Description of how you validated changes The generated looks correct and shouldn't cause breaking changes. *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Thanks @GavinZZ and CDK team! |
Describe the bug
When attempting to add Tags to the CfnReplicationConfig construct, no tags are actually added.
Furthermore, removing the Tags.of() and re-deploying the stack results in an error (presumably from the DMS API?).
Tags.of() does work for other constructs in aws-dms. For example, for the CfnEndpoint construct Tags.of() works as expected.
Expected Behavior
I would expect the tags to be added to the resource.
I would expect after removing Tags.of from the resource construct that I would not get any deployment errors.
Current Behavior
after adding Tags.of() and deploying, no tags are deployed on the replication config resource.
after then removing the Tags.of() and re-deploying, the deploy fails with this error, perhaps related to the dms API itself.
Reproduction Steps
Possible Solution
I suspect that this is related to the relative new-ness of the serverless replication support in cloudformation. But I have honestly no idea. 😅
Additional Information/Context
No response
CDK CLI Version
2.123.0 (build a594112)
Framework Version
No response
Node.js Version
v18.2.0
OS
macos Ventura 13.6.3 (22G436)
Language
TypeScript
Language Version
TypeScript 5.2.2
Other information
No response
The text was updated successfully, but these errors were encountered: