-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Incompatible tags definition for AWS::Athena::WorkGroup #6936
Comments
I have run into the same issue. Thanks to this report, I was able I work around it by using one of the "Escape Hatches":
|
I love the name of your class 😂 |
@udondan Interesting, since the code you are using is auto-generated, it implies either a bug in the CloudFormation spec, or in our code generator. The documented CFN spec seems correct: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-tags.html We will take a look. Thanks for reporting this! |
I also ran into this today. Instead of creating a new construct, I just did it in inline. const workgroup = new athena.CfnWorkGroup(this, "AthenaWorkGroup", {
name: "my-workgroup",
description: "my real description goes here",
});
// Workaround for a cdk bug. We can remove this when this issue is resolved:
// https://github.com/aws/aws-cdk/issues/6936
workgroup.addPropertyOverride("Tags", [{ key: "foo", value: "bar" }]); |
@l8on @blimmer Is this still working for you? I just came back to my Athena project and now this seems to be broken beyond fix via overrides. I'm getting
For |
The tags override I described in this post is still working for me as of 1.47.1. |
@iliapolo I checked the CFN spec and indeeed it is wrong. It should be "AWS::Athena::WorkGroup.Tags": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-tags.html#cfn-athena-workgroup-tags-tags",
"UpdateType": "Mutable",
"Required": false,
"Type": "List",
"ItemType": "Tag"
}, instead of "AWS::Athena::WorkGroup.Tags": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-tags.html",
"Properties": {
"Tags": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-tags.html#cfn-athena-workgroup-tags-tags",
"UpdateType": "Mutable",
"Required": false,
"Type": "List",
"ItemType": "Tag"
}
}
}, Nothing wrong with the generator. |
@moofish32 You mean this sort of patching? b59aed0#diff-cf42064b222db2a3e52591d8d39203b0 We still do that from time to time, would you like to have a go at it? |
yep -- let me take a look. |
Since Athena does not have AWS constructs the tests are empty. What does the team think about me adding one test to verify this patch is correctly applied for the cfn generated constructs? Can I also get feedback on the file name choice I made or a pointer to conventions on the patch file names? Fixes #6936 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Since Athena does not have AWS constructs the tests are empty. What does the team think about me adding one test to verify this patch is correctly applied for the cfn generated constructs? Can I also get feedback on the file name choice I made or a pointer to conventions on the patch file names? Fixes aws#6936 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Currently it is not possible to create an AWS::Athena::WorkGroup due to the way tags are defined.
The WorkGroup resource expects
tags
to be a list of objects. The definition in the autogenerated code though has another level. Something like:Even if no tags are set for the resource, the generated template holds an empty object:
"Tags": {},
This format is not supported and CloudFormation fails with an
Internal Failure
.Reproduction Steps
This code compiles. Note the nested tags definition.
If you remove the outer
tags
, it won't compile.If you remove the whole
tags
definition it again compiles, but fails to create the resource due to the unexpected default value of{}
.Error Log
Internal Failure
;-)Environment
All of them
Other
I wanted to go ahead and fix the problem myself but since this is part of the autogenerated code which even seems to be not in the repo, I wouldn't know how.
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: